def test_failed_with_random(): try: app.handle('asda', mock) assert False except Exception as e: assert str(e) == 'Unknown command'
def test_passed_with_q(): app.handle('Q', mock) assert mock.exit_called is True
def test_passed_with_b(): app.handle('B 10 3 o', mock) assert mock.b == (10, 3, 'o')
def test_passed_with_r(): app.handle('R 14 1 18 3', mock) assert mock.r == (14, 1, 18, 3)
def test_passed_with_l(): app.handle('L 1 2 6 2', mock) assert mock.l == (1, 2, 6, 2)
def test_passed_with_c(): app.handle('C 20 4', mock) assert mock.c == (20, 4)