def test_time(self):
        from chatterbot.logic import TimeLogicAdapter

        adapter = TimeLogicAdapter(self.chatbot)

        statement = Statement(text='What time is it?')

        response = adapter.process(statement)

        self.assertIn('The current time is', response.text)
        self.assertEqual(response.confidence, 1)
예제 #2
0
    def test_time(self):
        from chatterbot.logic import TimeLogicAdapter

        adapter = TimeLogicAdapter(self.chatbot)

        statement = Statement(text='What time is it?')

        response = adapter.process(statement)

        self.assertIn('The current time is', response.text)
        self.assertEqual(response.confidence, 1)
예제 #3
0
class TimeAdapterTests(TestCase):
    def setUp(self):
        self.adapter = TimeLogicAdapter()

    def test_positive_input(self):
        statement = Statement("Do you know what time it is?")
        response = self.adapter.process(statement)

        self.assertEqual(response.confidence, 1)
        self.assertIn("The current time is ", response.text)

    def test_negative_input(self):
        statement = Statement("What is an example of a pachyderm?")
        response = self.adapter.process(statement)

        self.assertEqual(response.confidence, 0)
        self.assertIn("The current time is ", response.text)
예제 #4
0
class TimeAdapterTests(TestCase):

    def setUp(self):
        self.adapter = TimeLogicAdapter()

    def test_positive_input(self):
        statement = Statement("Do you know what time it is?")
        response = self.adapter.process(statement)

        self.assertEqual(response.confidence, 1)
        self.assertIn("The current time is ", response.text)

    def test_negative_input(self):
        statement = Statement("What is an example of a pachyderm?")
        response = self.adapter.process(statement)

        self.assertEqual(response.confidence, 0)
        self.assertIn("The current time is ", response.text)
예제 #5
0
 def setUp(self):
     super().setUp()
     self.adapter = TimeLogicAdapter(self.chatbot)
예제 #6
0
 def setUp(self):
     self.adapter = TimeLogicAdapter()
예제 #7
0
 def setUp(self):
     self.adapter = TimeLogicAdapter()