S3FeedStorageTest: delete key after test

This commit is contained in:
Konstantin Lopuhin 2016-02-15 16:36:15 +03:00
parent 19b2910ad1
commit 5d2f067458
1 changed files with 3 additions and 1 deletions

View File

@ -102,8 +102,10 @@ class S3FeedStorageTest(unittest.TestCase):
file.write("content")
yield storage.store(file)
u = urlparse(uri)
key = connect_s3().get_bucket(u.hostname, validate=False).get_key(u.path)
bucket = connect_s3().get_bucket(u.hostname, validate=False)
key = bucket.get_key(u.path)
self.assertEqual(key.get_contents_as_string(), "content")
bucket.delete_key(u.path)
class StdoutFeedStorageTest(unittest.TestCase):