Skip to content

py_functional_tests are broken? #486

Closed
@max-wittig

Description

@max-wittig

Description of the problem, including code/CLI snippet

Running this in a python3 venv

# run the python API tests:
./tools/py_functional_tests.sh

yields the following error

TypeError: 'cmp' is an invalid keyword argument for this function

Even when using the old python2, tests fail, because of many reasons

Traceback (most recent call last):
  File "./tools/python_test_v4.py", line 129, in <module>
    email = new_user.emails.create({'email': 'foo2@bar.com'})
  File "/home/projects/python-gitlab/gitlab/exceptions.py", line 253, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body)
gitlab.exceptions.GitlabCreateError: 500: 500 Internal Server Error
Traceback (most recent call last):
  File "./tools/python_test_v4.py", line 145, in <module>
    {'name': 'token1', 'scopes': ['api', 'read_user']})
  File "/home/projects/python-gitlab/gitlab/exceptions.py", line 253, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body)
gitlab.exceptions.GitlabCreateError: 400: {"error":"scopes is invalid"}
ERROR: 'python ./tools/python_test_v4.py' failed
Traceback (most recent call last):
  File "./tools/python_test_v4.py", line 148, in <module>
    mail = gl.user.emails.create({'email': 'current@user.com'})
  File "/home/projects/python-gitlab/gitlab/exceptions.py", line 253, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body)
gitlab.exceptions.GitlabCreateError: 500: 500 Internal Server Error
ERROR: 'python ./tools/python_test_v4.py' failed

....

Are these tests maintained or what am I doing wrong here?

Expected Behavior

Tests run through for the latest master

Actual Behavior

See above

Specifications

  • python-gitlab version: latest master (1.3.0+)
  • API version you are using (v3/v4): v3+v4
  • Gitlab server version (or gitlab.com): localhost (tests)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions