Adapt tests to Clients.__iter__ returning keys

This commit is contained in:
Thor77 2017-09-25 23:15:40 +02:00
parent 8d1c19a734
commit 7fd4297c4d
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ def test_client_nick(clients):
def test_clients_iter(clients): def test_clients_iter(clients):
clients, cl1, cl2, uidcl1, uidcl2 = clients clients, cl1, cl2, uidcl1, uidcl2 = clients
client_list = list(iter(clients)) client_list = list(clients.values())
assert cl1 in client_list assert cl1 in client_list
assert cl2 in client_list assert cl2 in client_list
assert uidcl1 in client_list assert uidcl1 in client_list
@ -62,4 +62,4 @@ def test_clients_iter(clients):
def test_clients_delete(clients): def test_clients_delete(clients):
clients, cl1, _, _, _ = clients clients, cl1, _, _, _ = clients
del clients['1'] del clients['1']
assert cl1 not in clients assert '1' not in clients

View File

@ -47,7 +47,7 @@ def test_onlinetime(soup):
# find corresponding client-object # find corresponding client-object
client = list(filter( client = list(filter(
lambda c: c.nick == nick and c.onlinetime > pendulum.Interval(), lambda c: c.nick == nick and c.onlinetime > pendulum.Interval(),
clients clients.values()
)) ))
# assert existence # assert existence
assert client assert client