コード例 #1
0
    def test_init(self):
        valid_sync_types = [
            'file_at_src_and_dest', 'file_not_at_dest', 'file_not_at_src'
        ]
        for sync_type in valid_sync_types:
            strategy = BaseSync(sync_type)
            self.assertEqual(strategy.sync_type, sync_type)

        # Check for invalid ``sync_type`` options.
        with self.assertRaises(ValueError):
            BaseSync('wrong_sync_type')
コード例 #2
0
 def setUp(self):
     self.sync_strategy = BaseSync()