Пример #1
0
    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """
        adapter = TerminalAdapter()
        statement = Statement("Come with me if you want to live.")

        self.assertEqual(
            adapter.process_response(statement),
            statement.text
        )
Пример #2
0
    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """
        adapter = TerminalAdapter()
        statement = Statement("Come with me if you want to live.")

        self.assertEqual(
            adapter.process_response(statement),
            statement.text
        )
Пример #3
0
    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """

        test_data = {
            "user": {
                "Come with me if you want to live.": {}
            },
            "bot": {
                "Fortunately for you, my process cannot be terminated.": {}
            }
        }

        adapter = TerminalAdapter()

        response = adapter.process_response(test_data)

        self.assertEqual(
            "Fortunately for you, my process cannot be terminated.", response)
Пример #4
0
    def test_response_is_returned(self):
        """
        For consistency across io adapters, the
        terminal adaper should return the output value. 
        """

        test_data = {
            "user": {
                "Come with me if you want to live.": {}
            },
            "bot": {
                "Fortunately for you, my process cannot be terminated.": {}
            }
        }

        adapter = TerminalAdapter()

        response = adapter.process_response(test_data)

        self.assertEqual(
            "Fortunately for you, my process cannot be terminated.",
            response
        )
Пример #5
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)
Пример #6
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
        )
Пример #7
0
 def setUp(self):
     self.adapter = TerminalAdapter()
Пример #8
0
 def setUp(self):
     self.adapter = TerminalAdapter()