def test_init_empty_config(self): config = ServiceConfiguration.from_data("generic", "test", "category") service = Service(config) self.assertIsNotNone(service) self.assertEqual(service.configuration, config) self.assertEquals([], service.patterns()) self.assertIsNone(service.get_default_aiml_file())
def test_init_defined_config(self): config = ServiceConfiguration.from_data( "generic", "test", "category", service_class="testclass", default_response="default response", default_srai="default srai", storage="file", default_aiml="default.aiml") service = Service(config) self.assertIsNotNone(service) self.assertEqual(service.configuration, config) self.assertEqual("test", service.name) self.assertEqual("category", service.category) self.assertEquals([], service.patterns()) client = TestClient() self.assertIsNone(service.get_default_aiml_file())