Skip to content

Commit 3dc997f

Browse files
author
Gauvain Pocentek
committed
[tests] fix functional tests for python3
Fixes #486
1 parent 6d4ef0f commit 3dc997f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/python_test_v4.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@
103103
'name': 'Foo Bar', 'password': 'foobar_password'})
104104

105105
assert gl.users.list(search='foobar')[0].id == foobar_user.id
106-
usercmp = lambda x,y: cmp(x.id, y.id)
107-
expected = sorted([new_user, foobar_user], cmp=usercmp)
108-
actual = sorted(list(gl.users.list(search='foo')), cmp=usercmp)
106+
expected = [new_user, foobar_user]
107+
actual = list(gl.users.list(search='foo'))
109108
assert len(expected) == len(actual)
110109
assert len(gl.users.list(search='asdf')) == 0
111110
foobar_user.bio = 'This is the user bio'
@@ -337,7 +336,7 @@
337336
'content': 'Initial content',
338337
'commit_message': 'Initial commit'})
339338
readme = admin_project.files.get(file_path='README', ref='master')
340-
readme.content = base64.b64encode("Improved README")
339+
readme.content = base64.b64encode(b"Improved README")
341340
time.sleep(2)
342341
readme.save(branch="master", commit_message="new commit")
343342
readme.delete(commit_message="Removing README", branch="master")

0 commit comments

Comments
 (0)