Ejemplo n.º 1
0
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')
Ejemplo n.º 2
0
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')
Ejemplo n.º 3
0
 def setUp(self):
     self.sync_strategy = DeleteSync()
Ejemplo n.º 4
0
 def setUp(self):
     self.sync_strategy = DeleteSync()