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