def testIsArchiveReturnsTrue(self): files = [ 'test.gz', 'test.bz2', 'something.sql.bz2', 'test.zip', 'test.sql.gz' ] for f in files: self.assertTrue(rotatelib.is_archive(f))
def testIsArchiveReturnsTrue(self): files = ['test.gz', 'test.bz2', 'something.sql.bz2', 'test.zip', 'test.sql.gz'] for f in files: self.assertTrue(rotatelib.is_archive(f))
def testIsArchiveReturnsFalse(self): files = ['test.txt', '.test', 'something.sql', 'something.min.js'] for f in files: self.assertFalse(rotatelib.is_archive(f))
def testIsArchiveReturnsTrue(self): bucket = self.s3.get_bucket(TEST_BUCKET_NAME) k = Key(bucket) k.key = '/folder1/file.txt.bz2' self.assertTrue(rotatelib.is_archive(k))
def testIsArchiveReturnsFalse(self): bucket = self.s3.get_bucket(TEST_BUCKET_NAME) k = Key(bucket) k.key = '/hello.txt' k.set_contents_from_string('Hello World!') self.assertFalse(rotatelib.is_archive(k))