Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 def testIsArchiveReturnsFalse(self):
     files = ['test.txt', '.test', 'something.sql', 'something.min.js']
     for f in files:
         self.assertFalse(rotatelib.is_archive(f))
Example #4
0
 def testIsArchiveReturnsFalse(self):
     files = ['test.txt', '.test', 'something.sql', 'something.min.js']
     for f in files:
         self.assertFalse(rotatelib.is_archive(f))
Example #5
0
 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))
Example #6
0
 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))