summaryrefslogtreecommitdiff
path: root/tests/unit/test_service.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_service.py')
-rw-r--r--tests/unit/test_service.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py
index cce8c7a..75f8961 100644
--- a/tests/unit/test_service.py
+++ b/tests/unit/test_service.py
@@ -103,6 +103,15 @@ class TestSwiftReader(unittest.TestCase):
self.assertEqual(sr._expected_etag, None)
self.assertEqual(sr._actual_md5, None)
+ def test_create_with_ignore_checksum(self):
+ # md5 should not be initialized if checksum is False
+ sr = self.sr('path', 'body', {}, False)
+ self.assertEqual(sr._path, 'path')
+ self.assertEqual(sr._body, 'body')
+ self.assertEqual(sr._content_length, None)
+ self.assertEqual(sr._expected_etag, None)
+ self.assertEqual(sr._actual_md5, None)
+
def test_create_with_content_length(self):
sr = self.sr('path', 'body', {'content-length': 5})