def test_pushing_locked_turnstile_remains_locked(): turnstile = Turnstile() turnstile.push() assert turnstile.current_state() == "locked"
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"