class TestDeleteSync(unittest.TestCase): def setUp(self): self.sync_strategy = DeleteSync() def test_determine_should_sync(self): timenow = datetime.datetime.now() dst_file = FileStat(src='', dest='', compare_key='test.py', size=10, last_update=timenow, src_type='local', dest_type='s3', operation_name='') should_sync = self.sync_strategy.determine_should_sync( None, dst_file) self.assertTrue(should_sync) self.assertEqual(dst_file.operation_name, 'delete')
class TestDeleteSync(unittest.TestCase): def setUp(self): self.sync_strategy = DeleteSync() def test_determine_should_sync(self): timenow = datetime.datetime.now() dst_file = FileStat(src='', dest='', compare_key='test.py', size=10, last_update=timenow, src_type='local', dest_type='s3', operation_name='') should_sync = self.sync_strategy.determine_should_sync(None, dst_file) self.assertTrue(should_sync) self.assertEqual(dst_file.operation_name, 'delete')
def setUp(self): self.sync_strategy = DeleteSync()