Пример #1
0
 def test_syncdb_other_model_statedb(self):
     """Other models should not sync to State DBs"""
     router = StateDatasetRouter()
     self.assertFalse(router.allow_migrate("traffic_stops_nc", "auth",
                                           User))
Пример #2
0
 def test_syncdb_other_state_statedb(self):
     """State models should not sync to other State DBs"""
     router = StateDatasetRouter()
     self.assertFalse(router.allow_migrate("traffic_stops_nc", "md", Stop))
Пример #3
0
 def test_syncdb_other_model_defaultdb(self):
     """Other models should sync to the default DB"""
     router = StateDatasetRouter()
     self.assertTrue(router.allow_migrate("default", "auth", User))
Пример #4
0
 def test_syncdb_state_model_statedb(self):
     """State models should sync to same State DBs"""
     router = StateDatasetRouter()
     self.assertTrue(router.allow_migrate("traffic_stops_nc", "nc", Stop))
Пример #5
0
 def test_syncdb_state_model_defaultdb(self):
     """State models should not sync to the default DB"""
     router = StateDatasetRouter()
     self.assertFalse(router.allow_migrate("default", "nc", Stop))