Skip to content

Commit eee39a3

Browse files
author
Gauvain Pocentek
committed
Fix v3 tests
1 parent 7592ec5 commit eee39a3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/python_test_v3.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555
{'email': 'foobar@example.com', 'username': 'foobar',
5656
'name': 'Foo Bar', 'password': 'foobar_password'})
5757

58-
assert gl.users.search('foobar') == [foobar_user]
58+
assert(gl.users.search('foobar')[0].id == foobar_user.id)
5959
usercmp = lambda x,y: cmp(x.id, y.id)
6060
expected = sorted([new_user, foobar_user], cmp=usercmp)
6161
actual = sorted(gl.users.search('foo'), cmp=usercmp)
62-
assert expected == actual
63-
assert gl.users.search('asdf') == []
62+
assert len(expected) == len(actual)
63+
assert len(gl.users.search('asdf')) == 0
6464

65-
assert gl.users.get_by_username('foobar') == foobar_user
66-
assert gl.users.get_by_username('foo') == new_user
65+
assert gl.users.get_by_username('foobar').id == foobar_user.id
66+
assert gl.users.get_by_username('foo').id == new_user.id
6767
try:
6868
gl.users.get_by_username('asdf')
6969
except gitlab.GitlabGetError:

0 commit comments

Comments
 (0)