コード例 #1
0
class TerminalAdapterTests(TestCase):
    """
    The terminal adapter is designed to allow
    interaction with the chat bot to occur through
    a command line interface.
    """
    def setUp(self):
        self.adapter = TerminalAdapter()

    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """
        statement = Statement("Come with me if you want to live.")

        self.assertEqual(self.adapter.process_response(statement),
                         statement.text)
コード例 #2
0
class TerminalAdapterTests(TestCase):
    """
    The terminal adapter is designed to allow
    interaction with the chat bot to occur through
    a command line interface.
    """

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

    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """
        statement = Statement("Come with me if you want to live.")

        self.assertEqual(
            self.adapter.process_response(statement),
            statement.text
        )
コード例 #3
0
 def setUp(self):
     self.adapter = TerminalAdapter()
コード例 #4
0
 def setUp(self):
     self.adapter = TerminalAdapter()