Exemplo n.º 1
0
class TestLineInput(unittest.TestCase):
	def setUp(self):
		self.input = LineInput(DummyDatabase())

	def test_input_ok(self):
		self.assertEqual(('ok', 'test'), self.input.consume('test test'))

	def test_input_no_method(self):
		self.assertEqual(('error', ''), self.input.consume('nothing command'))

	def test_input_bad_args(self):
		self.assertEqual(('error', ''), self.input.consume('test test test'))
Exemplo n.º 2
0
	def setUp(self):
		self.input = LineInput(DummyDatabase())