diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-10 15:25:43 +0200 | 
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-10 15:26:05 +0200 | 
| commit | 3dc997ffba46a6e0666b9b3416ce50ce3ad71959 (patch) | |
| tree | 99321b5ca86369ffe75a4cd433178fee34c2c200 /tools/python_test_v4.py | |
| parent | 6d4ef0fcf04a5295c9601b6f8268a27e3bfce198 (diff) | |
| download | gitlab-3dc997ffba46a6e0666b9b3416ce50ce3ad71959.tar.gz | |
[tests] fix functional tests for python3
Fixes #486
Diffstat (limited to 'tools/python_test_v4.py')
| -rw-r--r-- | tools/python_test_v4.py | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py index 83dd967..407a03c 100644 --- a/tools/python_test_v4.py +++ b/tools/python_test_v4.py @@ -103,9 +103,8 @@ foobar_user = gl.users.create(       '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' @@ -337,7 +336,7 @@ admin_project.files.create({'file_path': 'README',                              '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") | 
