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

« back to all changes in this revision

Viewing changes to authres/tests

  • Committer: Scott Kitterman
  • Date: 2018-02-17 08:17:08 UTC
  • Revision ID: scott@kitterman.com-20180217081708-di3kr3y2mc4fg00b
Add a new test for multiple dkim results in the same header

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
>>> dsr_fail.match_signature_algorithm('mail-router.example.net', 'rsa-sha256')
175
175
False
176
176
 
 
177
Header from dcrup testing
 
178
>>> import authres
 
179
>>> dss_pass = authres.DKIMAuthenticationResult(result = 'pass', result_comment = 'Good 256 bit ed25519-sha256 signature.',
 
180
... header_d = 'example.com', header_i = '@example.com', header_a = 'ed25519-sha256')
 
181
>>> dss_fail = authres.DKIMAuthenticationResult(result = 'fail', result_comment = 'Bad 1024 bit rsa-sha256 signature.',
 
182
... header_d = 'example.com', header_i = '@example.com', header_a = 'rsa-sha256')
 
183
>>> str(authres.AuthenticationResultsHeader(authserv_id = 'relay02.example.org',
 
184
... results = [dss_pass, dss_fail]))
 
185
'Authentication-Results: relay02.example.org; dkim=pass (Good 256 bit ed25519-sha256 signature.) header.d=example.com header.i=@example.com header.a=ed25519-sha256; dkim=fail (Bad 1024 bit rsa-sha256 signature.) header.d=example.com header.i=@example.com header.a=rsa-sha256'
 
186
 
177
187
# Missing parsing header comment.
178
188
#FIXME
179
189
>>> import authres