Convert filter to list

because filters are (non-subscriptable) objects in py3
This commit is contained in:
Thor77 2017-03-04 00:02:41 +01:00
parent a694a2bc58
commit aaf5f2b851
1 changed files with 2 additions and 2 deletions

View File

@ -52,10 +52,10 @@ def test_onlinetime(soup):
nick = nick.text nick = nick.text
onlinetime = onlinetime.text onlinetime = onlinetime.text
# find corresponding client-object # find corresponding client-object
client = filter( client = list(filter(
lambda c: c.nick == nick and c.onlinetime > timedelta(0), lambda c: c.nick == nick and c.onlinetime > timedelta(0),
clients clients
) ))
# assert existence # assert existence
assert client assert client
client = client[0] client = client[0]