Ejemplo n.º 1
0
 def test_it_should_get_destination_version_when_user_does_not_inform_a_specific_version(self, simplevirtuosomigrate_mock):
     self.initial_config.update({"schema_version": None})
     main = Main(Config(self.initial_config))
     self.assertEqual("latest_version_available", main._get_destination_version())
Ejemplo n.º 2
0
 def test_it_should_get_destination_version_when_user_informs_a_specific_version(self, simplevirtuosomigrate_mock):
     self.initial_config.update({"schema_version": "20090214115300"})
     main = Main(Config(self.initial_config))
     self.assertEqual("20090214115300", main._get_destination_version())
     main.virtuoso_migrate.check_if_version_exists.assert_called_with('20090214115300')
     self.assertEqual(1, main.virtuoso_migrate.check_if_version_exists.call_count)