def service(request): # a class may be tagged to run in a different environment marker = request.node.get_closest_marker("env") env = marker.args[0] if marker else None config = ConfigManager().get_config(env) service = Service.from_config(config) assert service.setup() yield service service.teardown()
def setUp(self): self.config = ConfigManager().get_config() self.config["token"] = "" self.service = Service.from_config(self.config) self.assertTrue(self.service.setup())