diff options
author | Mike Schwartz <mfschwartz@google.com> | 2017-06-28 11:09:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 11:09:07 -0700 |
commit | 83481807ccf1615d692366f6ce1c6faba262b672 (patch) | |
tree | 28a09597da60540fd933dce2fee551ba7e030a3b /tests | |
parent | 0a9b11408698e3923201d27c67eef1a59e6dd105 (diff) | |
parent | 9c2fc7e28901c043ce06d9b2c0b3512993a61267 (diff) | |
download | boto-83481807ccf1615d692366f6ce1c6faba262b672.tar.gz |
Merge pull request #3734 from edmorley/anon-generate_url
Fix generate_url() AttributeError when using anonymous connections
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/s3/test_connection.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/s3/test_connection.py b/tests/unit/s3/test_connection.py index a1d43231..05c561b4 100644 --- a/tests/unit/s3/test_connection.py +++ b/tests/unit/s3/test_connection.py @@ -48,6 +48,18 @@ class TestSignatureAlteration(AWSMockServiceTestCase): ) +class TestAnon(MockServiceWithConfigTestCase): + connection_class = S3Connection + + def test_generate_url(self): + conn = self.connection_class( + anon=True, + host='s3.amazonaws.com' + ) + url = conn.generate_url(0, 'GET', bucket='examplebucket', key='test.txt') + self.assertNotIn('Signature=', url) + + class TestPresigned(MockServiceWithConfigTestCase): connection_class = S3Connection |