Beispiel #1
0
def test_controller_logoff_clears_user():
    clear_expectations()
    clear()

    ctrl = Controller()
    ctrl.login("some_random_user")
    ctrl.logoff()

    assert not ctrl.user
Beispiel #2
0
def test_controller_can_authenticate_user():
    clear_expectations()
    clear()

    ctrl = Controller()

    ctrl.login(user="******")

    assert ctrl.user == "auth_user"