~ar-python-hackers/authentication-results-python/trunk

« back to all changes in this revision

Viewing changes to authres/tests

  • Committer: Scott Kitterman
  • Date: 2015-03-10 02:26:37 UTC
  • Revision ID: scott@kitterman.com-20150310022637-l8bzkqwgpzykek1s
Add rrvs parse test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
 
579
579
"""
580
580
 
 
581
# RFC 7293, The Require-Recipient-Valid-Since Header Field  and SMTP Service Extension, header field types
 
582
 
 
583
# Example 12.3 from RFC 7293
 
584
>>> import authres.rrvs
 
585
>>> rrvsarobj = authres_context.parse('Authentication-Results: mx.example.com; rrvs=pass smtp.rcptto=user@example.com')
 
586
>>> str(rrvsarobj.authserv_id)
 
587
'mx.example.com'
 
588
>>> str(rrvsarobj.results[0].method)
 
589
'rrvs'
 
590
>>> str(rrvsarobj.results[0].result)
 
591
'pass'
 
592
>>> str(rrvsarobj.results[0].reason)
 
593
'None'
 
594
>>> str(rrvsarobj.results[0].properties[0].type)
 
595
'smtp'
 
596
>>> str(rrvsarobj.results[0].properties[0].name)
 
597
'rcptto'
 
598
>>> str(rrvsarobj.results[0].properties[0].value)
 
599
'user@example.com'
 
600
 
 
601
 
581
602
# vim:sw=4 sts=4