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 )
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)
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)
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 )
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 )