Skip to content

Commit

Permalink
[tests] fix functional tests for python3
Browse files Browse the repository at this point in the history
Fixes #486
  • Loading branch information
Gauvain Pocentek committed May 10, 2018
1 parent 6d4ef0f commit 3dc997f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/python_test_v4.py
Expand Up @@ -103,9 +103,8 @@
'name': 'Foo Bar', 'password': 'foobar_password'})

assert gl.users.list(search='foobar')[0].id == foobar_user.id
usercmp = lambda x,y: cmp(x.id, y.id)
expected = sorted([new_user, foobar_user], cmp=usercmp)
actual = sorted(list(gl.users.list(search='foo')), cmp=usercmp)
expected = [new_user, foobar_user]
actual = list(gl.users.list(search='foo'))
assert len(expected) == len(actual)
assert len(gl.users.list(search='asdf')) == 0
foobar_user.bio = 'This is the user bio'
Expand Down Expand Up @@ -337,7 +336,7 @@
'content': 'Initial content',
'commit_message': 'Initial commit'})
readme = admin_project.files.get(file_path='README', ref='master')
readme.content = base64.b64encode("Improved README")
readme.content = base64.b64encode(b"Improved README")
time.sleep(2)
readme.save(branch="master", commit_message="new commit")
readme.delete(commit_message="Removing README", branch="master")
Expand Down

0 comments on commit 3dc997f

Please sign in to comment.