def test_get_default_response_nothing(self): config = ServiceConfiguration.from_data("generic", "test", "category") service = Service(config) client = TestClient() client_context = client.create_client_context("testuser") self.assertEqual("Service failed to return valid response", service._get_default_response(client_context))
def test_get_default_response_default_srai(self): config = ServiceConfiguration.from_data( "generic", "test", "category", default_srai="TEST SERVICE FAILURE") service = Service(config) client = TestClient() client_context = client.create_client_context("testuser") self.assertEqual("Default srai response", service._get_default_response(client_context))
def test_get_default_response_default_response(self): config = ServiceConfiguration.from_data( "generic", "test", "category", default_response="This is the default response") service = Service(config) client = TestClient() client_context = client.create_client_context("testuser") self.assertEqual("This is the default response", service._get_default_response(client_context))