# After we refact tests start with `test_settings`, this db_router should be used class TestRouter: def db_for_read(self, model, **hints): if model._meta.app_label == 'discourse': return 'discourse' return None def db_for_write(self, model, **hints): if model._meta.app_label == 'discourse': return 'discourse' return None def allow_relation(self, obj1, obj2, **hints): return None def allow_migrate(self, db, app_label, model_name=None, **hints): if app_label == 'discourse': if db == 'discourse': return True else: return False else: if db == 'discourse': return False return None