Exemple #1
0
 def test_generate_authentication_header(self):
     expected_authorization_header = 'AWS4-HMAC-SHA256 Credential=public_key/20150620/region/s3/aws4_request, ' \
                                     'SignedHeaders=host;X-Amz-Content-Sha256;X-Amz-Date, Signature=signed_request'
     actual_authorization_header = generate_authorization_header('public_key', dt, 'region',
                                                                 ['host', 'X-Amz-Content-Sha256', 'X-Amz-Date'],
                                                                 'signed_request')
     eq_(expected_authorization_header, actual_authorization_header)
Exemple #2
0
 def test_generate_authentication_header(self):
     expected_authorization_header = 'AWS4-HMAC-SHA256 Credential=public_key/20150620/region/s3/aws4_request, ' \
                                     'SignedHeaders=host;X-Amz-Content-Sha256;X-Amz-Date, Signature=signed_request'
     actual_authorization_header = generate_authorization_header('public_key', dt, 'region',
                                                                 ['host', 'X-Amz-Content-Sha256', 'X-Amz-Date'],
                                                                 'signed_request')
     eq_(expected_authorization_header, actual_authorization_header)
 def test_generate_authentication_header(self):
     expected_authorization_header = "AWS4-HMAC-SHA256 Credential=public_key/20150620/region/s3/aws4_request, " \
                                     "SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=signed_request"
     actual_authorization_header = generate_authorization_header('public_key', dt, 'region',
                                                                 ['host', 'x-amz-content-sha256', 'x-amz-date'],
                                                                 'signed_request')
     eq_(expected_authorization_header, actual_authorization_header)
Exemple #4
0
 def test_generate_authentication_header(self):
     expected_authorization_header = (
         "AWS4-HMAC-SHA256 Credential=public_key/20150620/region/s3/aws4_request, "
         "SignedHeaders=host;X-Amz-Content-Sha256;X-Amz-Date, Signature=signed_request"
     )
     actual_authorization_header = generate_authorization_header(
         "public_key", dt, "region", ["host", "X-Amz-Content-Sha256", "X-Amz-Date"], "signed_request"
     )
     eq_(expected_authorization_header, actual_authorization_header)