Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/units/db/blobs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/db/blobs.py')
-rwxr-xr-xtests/units/db/blobs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/units/db/blobs.py b/tests/units/db/blobs.py
index 463af56..9a68402 100755
--- a/tests/units/db/blobs.py
+++ b/tests/units/db/blobs.py
@@ -34,6 +34,7 @@ class BlobsTest(tests.Test):
blob.path)
self.assertEqual({
'content-type': 'application/octet-stream',
+ 'content-length': str(len(content)),
},
blob)
@@ -42,6 +43,7 @@ class BlobsTest(tests.Test):
file(blob.path).read())
self.assertEqual([
'content-type: application/octet-stream',
+ 'content-length: %s' % len(content),
],
file(blob.path + '.meta').read().strip().split('\n'))
@@ -63,6 +65,7 @@ class BlobsTest(tests.Test):
blob.path)
self.assertEqual({
'content-type': 'application/octet-stream',
+ 'content-length': str(len(content)),
},
blob)
@@ -71,6 +74,7 @@ class BlobsTest(tests.Test):
file(blob.path).read())
self.assertEqual([
'content-type: application/octet-stream',
+ 'content-length: %s' % len(content),
],
file(blob.path + '.meta').read().strip().split('\n'))
@@ -95,6 +99,7 @@ class BlobsTest(tests.Test):
'status': '301 Moved Permanently',
'location': 'location',
'content-type': 'application/octet-stream',
+ 'content-length': '0',
},
blob)
@@ -105,6 +110,7 @@ class BlobsTest(tests.Test):
'status: 301 Moved Permanently',
'location: location',
'content-type: application/octet-stream',
+ 'content-length: 0',
],
file(blob.path + '.meta').read().strip().split('\n'))
@@ -118,6 +124,7 @@ class BlobsTest(tests.Test):
blob = blobs.post('probe')
self.assertEqual({
'content-type': 'application/octet-stream',
+ 'content-length': str(len('probe')),
},
blob)