diff options
| author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-08-21 12:41:29 +0200 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-08-21 12:41:29 +0200 |
| commit | e93188e2953929d27f2943ae964eab7e3babd6f2 (patch) | |
| tree | 18ba4c85d4560c09375569f8a4765f5426eacc90 /gitlab | |
| parent | 24d5035558dec227d2a497d7bf5be3bbaafc0c00 (diff) | |
| download | gitlab-e93188e2953929d27f2943ae964eab7e3babd6f2.tar.gz | |
fix pep8 test
Diffstat (limited to 'gitlab')
| -rw-r--r-- | gitlab/__init__.py | 3 | ||||
| -rw-r--r-- | gitlab/tests/test_gitlab.py | 21 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index f61b3b4..f03a356 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -627,7 +627,8 @@ class GitlabObject(object): """ #: Url to use in GitLab for this object _url = None - #some objects (e.g. merge requests) have different urls for singular and plural + # Some objects (e.g. merge requests) have different urls for singular and + # plural _urlPlural = None _returnClass = None _constructorTypes = None diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index 5530843..0743435 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -22,7 +22,6 @@ try: import unittest except ImportError: import unittest2 as unittest -import json from httmock import HTTMock # noqa from httmock import response # noqa @@ -184,16 +183,16 @@ class TestGitLabMethods(unittest.TestCase): path='/api/v3/projects/1/repository/branches', method="get", query=r'per_page=1') def resp_one(url, request): - """ - First request: + """First request: + http://localhost/api/v3/projects/1/repository/branches?per_page=1 """ headers = { 'content-type': 'application/json', - 'link': '<http://localhost/api/v3/projects/1/repository/branc' \ - 'hes?page=2&per_page=0>; rel="next", <http://localhost/api/v3' \ - '/projects/1/repository/branches?page=2&per_page=0>; rel="las' \ - 't", <http://localhost/api/v3/projects/1/repository/branches?' \ + 'link': '<http://localhost/api/v3/projects/1/repository/branc' + 'hes?page=2&per_page=0>; rel="next", <http://localhost/api/v3' + '/projects/1/repository/branches?page=2&per_page=0>; rel="las' + 't", <http://localhost/api/v3/projects/1/repository/branches?' 'page=1&per_page=0>; rel="first"' } content = ('[{"branch_name": "otherbranch", ' @@ -207,10 +206,10 @@ class TestGitLabMethods(unittest.TestCase): def resp_two(url, request): headers = { 'content-type': 'application/json', - 'link': '<http://localhost/api/v3/projects/1/repository/branc' \ - 'hes?page=1&per_page=0>; rel="prev", <http://localhost/api/v3' \ - '/projects/1/repository/branches?page=2&per_page=0>; rel="las' \ - 't", <http://localhost/api/v3/projects/1/repository/branches?' \ + 'link': '<http://localhost/api/v3/projects/1/repository/branc' + 'hes?page=1&per_page=0>; rel="prev", <http://localhost/api/v3' + '/projects/1/repository/branches?page=2&per_page=0>; rel="las' + 't", <http://localhost/api/v3/projects/1/repository/branches?' 'page=1&per_page=0>; rel="first"' } content = ('[{"branch_name": "testbranch", ' |
