From 6aa227e12b676ad1cdcb0669088839480bab63b1 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 3 Mar 2014 20:23:06 +0100 Subject: [PATCH] Add new test --- tests/storage/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index 0aa21bc..881f6d8 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -41,11 +41,18 @@ class StorageTests(object): s.upload(item) self.assertRaises(exceptions.PreconditionFailed, s.upload, item) + def test_upload(self): + s = self._get_storage() + item = self._create_bogus_item(1) + href, etag = s.upload(item) + assert s.get(href)[0].raw == item.raw + def test_update(self): s = self._get_storage() item = self._create_bogus_item(1) href, etag = s.upload(item) assert s.get(href)[0].raw == item.raw + new_item = Item(item.raw + u'\nX-SOMETHING: YES\n') s.update(href, new_item, etag) assert s.get(href)[0].raw == new_item.raw