示例#1
0
def test_pushing_locked_turnstile_remains_locked():
    turnstile = Turnstile()
    turnstile.push()
    assert turnstile.current_state() == "locked"
示例#2
0
def test_push_locks_previously_unlocked_turnstile():
    turnstile = Turnstile(amount_for_passing=10)
    turnstile.change_state(Unlocked(turnstile))
    turnstile.push()
    assert turnstile.current_state() == "locked"