Beispiel #1
0
def test_get_any_client_raises_exception_with_two_clients():
    client = MagicMock()
    manager = SessionManager()
    manager.add_session("name0", client)
    manager.add_session("name1", client)

    manager.get_any_session()
Beispiel #2
0
def test_get_any_client():
    client = MagicMock()
    manager = SessionManager()

    manager.add_session("name", client)

    assert_equals(client, manager.get_any_session())
Beispiel #3
0
def test_get_any_client_raises_exception_with_no_client():
    manager = SessionManager()

    manager.get_any_session()