Example #1
0
    def test_construction_with_create_query_url(self):
        config = BrainOpenChatBotsConfiguration()
        handler = OpenChatBotDomainHandler(config)
        self.assertIsNotNone(handler)

        self.assertEqual(
            "https://website1.com/.well-known/openchatbot-configuration",
            handler._create_query_url("website1", "https", "com"))
        self.assertEqual(
            "http://website1.com/.well-known/openchatbot-configuration",
            handler._create_query_url("website1", "http", "com"))

        self.assertEqual(
            "https://website1.org/.well-known/openchatbot-configuration",
            handler._create_query_url("website1", "https", ext="org"))
        self.assertEqual(
            "http://website1.org/.well-known/openchatbot-configuration",
            handler._create_query_url("website1", "http", ext="org"))
Example #2
0
    def test_construction_with_create_query_url(self):
        handler = OpenChatBotDomainHandler()
        self.assertIsNotNone(handler)

        self.assertEquals("https://website1.com/.well-known/openchatbot-configuration", handler._create_query_url("website1", True))
        self.assertEquals("http://website1.com/.well-known/openchatbot-configuration", handler._create_query_url("website1", False))

        self.assertEquals("https://website1.org/.well-known/openchatbot-configuration", handler._create_query_url("website1", True, ext="org"))
        self.assertEquals("http://website1.org/.well-known/openchatbot-configuration", handler._create_query_url("website1", False, ext="org"))