def test_destroy_model_unregisters(self, model_registry, model_schema): factory = ModelFactory(model_schema) factory.make_model() assert model_registry.is_registered(model_schema.model_name) factory.destroy_model() assert not model_registry.is_registered(model_schema.model_name)
def test_destroy_model_disconnects_signal(self, model_schema): factory = ModelFactory(model_schema) model = factory.make_model() assert self.schema_checker_is_connected(model) factory.destroy_model() assert not self.schema_checker_is_connected(model)