summaryrefslogtreecommitdiff
path: root/gitlab/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix(files): do not url-encode file paths twiceNejc Habjan2021-04-261-0/+49
|
* Merge pull request #1397 from JohnVillalovos/jlvillal/flake8Max Wittig2021-04-2311-50/+45
|\ | | | | Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
| * chore: fix F841 errors reported by flake8John L. Villalovos2021-04-182-2/+2
| | | | | | | | | | | | Local variable name is assigned to but never used https://www.flake8rules.com/rules/F841.html
| * chore: fix F401 errors reported by flake8John L. Villalovos2021-04-184-7/+2
| | | | | | | | | | | | F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
| * chore: fix E711 error reported by flake8John L. Villalovos2021-04-182-7/+7
| | | | | | | | | | | | E711: Comparison to none should be 'if cond is none:' https://www.flake8rules.com/rules/E711.html
| * chore: fix E712 errors reported by flake8John L. Villalovos2021-04-184-14/+14
| | | | | | | | | | | | E712: Comparison to true should be 'if cond is true:' or 'if cond:' https://www.flake8rules.com/rules/E712.html
| * chore: fix E741/E742 errors reported by flake8John L. Villalovos2021-04-183-20/+20
| | | | | | | | | | | | | | | | | | Fixes to resolve errors for: https://www.flake8rules.com/rules/E741.html Do not use variables named 'I', 'O', or 'l' (E741) https://www.flake8rules.com/rules/E742.html Do not define classes named 'I', 'O', or 'l' (E742)
* | Merge pull request #1383 from spyoungtech/dirfixNejc Habjan2021-04-211-0/+4
|\ \ | | | | | | fix(types): prevent __dir__ in RestObject from producing duplicates
| * | test(object): add test for __dir__ duplicatesSpencer Phillip Young2021-04-211-0/+4
| | |
* | | chore: remove unused function sanitize_parameters()John L. Villalovos2021-04-181-20/+0
| | | | | | | | | | | | | | | | | | The function sanitize_parameters() was used when the v3 API was in use. Since v3 API support has been removed there are no more users of this function.
* | | test(objects): add tests for resource state eventsNejc Habjan2021-04-182-0/+115
| |/ |/|
* | Merge pull request #1359 from klorenz/feat_token_lookupNejc Habjan2021-04-181-0/+38
|\ \ | | | | | | feat(config): allow using a credential helper to lookup tokens
| * | chore: make lint happyKay-Uwe (Kiwi) Lorenz2021-03-071-13/+22
| | |
| * | fix: make secret helper more user friendlyKay-Uwe (Kiwi) Lorenz2021-03-071-11/+25
| | |
| * | fix: linting issues and testKay-Uwe (Kiwi) Lorenz2021-03-061-0/+4
| | |
| * | chore: add testKay-Uwe (Kiwi) Lorenz2021-03-061-0/+11
| | |
* | | Merge pull request #1375 from JohnVillalovos/jlvillal/update_uses_postNejc Habjan2021-04-171-1/+25
|\ \ \ | | | | | | | | chore: remove usage of getattr()
| * | | chore: remove usage of getattr()John L. Villalovos2021-03-151-1/+25
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Remove usage of getattr(self, "_update_uses_post", False) Instead add it to class and set default value to False. Add a tests that shows it is set to True for the ProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
* | | Merge pull request #1366 from JohnVillalovos/jlvillal/create_attrsNejc Habjan2021-04-171-10/+22
|\ \ \ | | | | | | | | chore: have _create_attrs & _update_attrs be a namedtuple
| * | | chore: have _create_attrs & _update_attrs be a namedtupleJohn L. Villalovos2021-04-171-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple.
* | | | Merge pull request #1363 from python-gitlab/feat/all-audit-eventsMax Wittig2021-03-241-7/+37
|\ \ \ \ | |_|/ / |/| | | Feat: cover all audit events
| * | | feat(objects): add support for group audit events APIfeat/all-audit-eventsNejc Habjan2021-03-071-3/+20
| | | |
| * | | test(objects): add unit test for instance audit eventsNejc Habjan2021-03-071-5/+18
| | | |
* | | | Merge pull request #1373 from JacobHenner/jacobhenner/add-package_filesNejc Habjan2021-03-141-1/+69
|\ \ \ \ | |_|/ / |/| | | feat: add support for Project Package Files
| * | | chore: fix package file test namingNejc Habjan2021-03-141-1/+1
| | | |
| * | | feat: add ProjectPackageFileJacob Henner2021-03-101-1/+69
| |/ / | | | | | | | | | | | | | | | | | | Add ProjectPackageFile and the ability to list project package package_files. Fixes #1372
* | | chore: add _create_attrs & _update_attrs to RESTManagerJohn L. Villalovos2021-03-101-42/+0
|/ / | | | | | | | | | | | | Add the attributes: _create_attrs and _update_attrs to the RESTManager class. This is so that we stop using getattr() if we don't need to. This also helps with type-hints being available for these attributes.
* | fix: handle tags like debian/2%2.6-21 as identifiersEmanuele Aina2021-03-051-0/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Git refnames are relatively free-form and can contain all sort for special characters, not just `/` and `#`, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 standard for storing packaging in git repositories mandates the use of the `%` character in tags in some cases like `debian/2%2.6-21`. Unfortunately python-gitlab currently only escapes `/` to `%2F` and in some cases `#` to `%23`. This means that when using the commit API to retrieve information about the `debian/2%2.6-21` tag only the slash is escaped before being inserted in the URL path and the `%` is left untouched, resulting in something like `/api/v4/projects/123/repository/commits/debian%2F2%2.6-21`. When urllib3 seees that it detects the invalid `%` escape and then urlencodes the whole string, resulting in `/api/v4/projects/123/repository/commits/debian%252F2%252.6-21`, where the original `/` got escaped twice and produced `%252F`. To avoid the issue, fully urlencode identifiers and parameters to avoid the urllib3 auto-escaping in all cases. Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
* feat(users): add follow/unfollow APIfeat/user-follow-apiMax Wittig2021-02-271-0/+80
|
* test: don't add duplicate fixtureMax Wittig2021-02-241-26/+0
| | | Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
* feat(projects): add project access token apiMax Wittig2021-02-241-0/+139
|
* feat(objects): add Release Links API supportNejc Habjan2021-02-212-0/+141
|
* Merge pull request #1308 from Sineaggi/add-project-audit-endpointNejc Habjan2021-02-201-0/+79
|\ | | | | feat: add project audit endpoint
| * chore(tests): remove unused URL segmentNejc Habjan2021-02-201-2/+2
| |
| * feat: add project audit endpointClayton Walker2021-02-191-0/+79
| |
* | refactor: move Gitlab and GitlabList to gitlab/client.pyJohn L. Villalovos2021-02-181-0/+1
|/ | | | | | | | Move the classes Gitlab and GitlabList from gitlab/__init__.py to the newly created gitlab/client.py file. Update one test case that was depending on requests being defined in gitlab/__init__.py
* feat: add personal access token APIfeat/personal-access-token-apiMax Wittig2021-02-171-0/+46
| | | | See: https://docs.gitlab.com/ee/api/personal_access_tokens.html
* feat(issues): add missing get verb to IssueManagerfeat/single-issue-apiNejc Habjan2021-02-061-2/+21
|
* feat: import from bitbucket serverDan Fuchs2021-02-041-0/+38
| | | | | | | | | | | | | I'd like to use this libary to automate importing Bitbucket Server repositories into GitLab. There is a [GitLab API endpoint](https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server) to do this, but it is not exposed through this library. * Add an `import_bitbucket_server` method to the `ProjectManager`. This method calls this GitLab API endpoint: https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server * Modify `import_gitlab` method docstring for python3 compatibility * Add a skipped stub test for the existing `import_github` method
* test(api,cli): add tests for custom user agentNejc Habjan2021-01-312-2/+46
|
* Merge pull request #1200 from ↵Max Wittig2020-10-291-0/+294
|\ | | | | | | | | robinson96/feature/project_merge_request_approval_rules Feature/project merge request approval rules
| * test: add test_project_merge_request_approvals.pyPeter B. Robinson2020-10-141-0/+294
| |
* | fix(base): really refresh objectfix/delete-attrMax Wittig2020-10-121-0/+7
| | | | | | | | | | | | This fixes and error, where deleted attributes would not show up Fixes #1155
* | feat: unit tests addedAlex Zirka2020-10-081-0/+111
|/
* Merge pull request #1180 from Shkurupii/add-unittests-for-project-badgesNejc Habjan2020-09-101-0/+210
|\ | | | | test: add unit tests for badges API
| * test: add unit tests for badges APIOleksii Shkurupii2020-09-071-0/+210
| |
* | feat(api): add support for user identity provider deletionfeat/delete-user-identitiesNejc Habjan2020-09-071-0/+17
| |
* | test: add unit tests for resource label events APIOleksii Shkurupii2020-09-041-0/+105
|/
* test(api): add tests for variables APINejc Habjan2020-08-311-0/+193
|
* Merge pull request #1157 from Shkurupii/issue-1154Max Wittig2020-08-291-0/+73
|\ | | | | Add support to resource milestone events