summaryrefslogtreecommitdiff
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* chore: consolidate license and authorsNejc Habjan2022-08-047-122/+0
|
* feat(client): warn user on misconfigured URL in `auth()`Nejc Habjan2022-08-041-1/+23
|
* test(unit): reproduce duplicate encoded query paramsNejc Habjan2022-08-041-0/+18
|
* fix: optionally keep user-provided base URL for pagination (#2149)Omar Mochtar2022-08-031-0/+55
|
* Merge pull request #2157 from python-gitlab/jlvillal/mypy_step_by_stepNejc Habjan2022-07-292-2/+3
|\ | | | | chore: enable mypy check `warn_return_any`
| * chore: enable mypy check `warn_return_any`John L. Villalovos2022-07-282-2/+3
| | | | | | | | Update code so that the `warn_return_any` check passes.
* | Merge pull request #2201 from python-gitlab/jlvillal/encoding_warningNejc Habjan2022-07-292-2/+3
|\ \ | | | | | | chore: make code PEP597 compliant
| * | chore: make code PEP597 compliantJohn L. Villalovos2022-07-282-2/+3
| |/ | | | | | | | | | | Use `encoding="utf-8"` in `open()` and open-like functions. https://peps.python.org/pep-0597/
* | Merge pull request #2194 from python-gitlab/jlvillal/update-gitlabNejc Habjan2022-07-291-1/+4
|\ \ | |/ |/| test(functional): bump GitLab docker image to 15.2.0-ee.0
| * chore(topics): 'title' is required when creating a topicJohn L. Villalovos2022-07-281-1/+4
| | | | | | | | In GitLab >= 15.0 `title` is required when creating a topic.
* | fix: use the [] after key names for array variables in `params`John L. Villalovos2022-07-273-12/+72
|/ | | | | | | | | | | | | | | | | | 1. If a value is of type ArrayAttribute then append '[]' to the name of the value for query parameters (`params`). This is step 3 in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b Step two was: commit a57334f1930752c70ea15847a39324fa94042460 Fixes: #1698 [1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
* feat: add support for iterations APINejc Habjan2022-07-271-0/+47
|
* feat(groups): add support for shared projects APINejc Habjan2022-07-261-0/+38
|
* test: always ensure clean config environmentNejc Habjan2022-07-262-14/+10
|
* feat(issues): add support for issue reorder APINejc Habjan2022-07-241-0/+20
|
* test: fix broken test if user had config filesJohn L. Villalovos2022-07-231-1/+6
| | | | | | | Use `monkeypatch` to ensure that no config files are reported for the test. Closes: #2172
* feat: add support for group and project invitations APINejc Habjan2022-07-231-0/+159
|
* feat(projects): add support for project restore APINejc Habjan2022-07-231-0/+17
|
* refactor: migrate services to integrationsNejc Habjan2022-07-231-25/+31
|
* fix(runners): fix listing for /runners/allNejc Habjan2022-07-231-1/+12
|
* fix(config): raise error when gitlab id provided but no config section foundNejc Habjan2022-07-221-1/+6
|
* fix(config): raise error when gitlab id provided but no config file foundNejc Habjan2022-07-221-0/+6
|
* fix: add `get_all` param (and `--get-all`) to allow passing `all` to APINejc Habjan2022-07-213-5/+5
|
* Merge pull request #1872 from python-gitlab/jlvillal/as_dictNejc Habjan2022-07-201-0/+97
|\ | | | | feat: add `asdict()` and `to_json()` methods to Gitlab Objects
| * feat: add `asdict()` and `to_json()` methods to Gitlab ObjectsJohn L. Villalovos2022-07-201-8/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `asdict()` method that returns a dictionary representation copy of the Gitlab Object. This is a copy and changes made to it will have no impact on the Gitlab Object. The `asdict()` method name was chosen as both the `dataclasses` and `attrs` libraries have an `asdict()` function which has the similar purpose of creating a dictionary represenation of an object. Also add a `to_json()` method that returns a JSON string representation of the object. Closes: #1116
| * fix: results returned by `attributes` property to show updatesJohn L. Villalovos2022-07-201-0/+26
| | | | | | | | | | | | | | | | | | Previously the `attributes` method would show the original values in a Gitlab Object even if they had been updated. Correct this so that the updated value will be returned. Also use copy.deepcopy() to ensure that modifying the dictionary returned can not also modify the object.
* | chore: add a `lazy` boolean attribute to `RESTObject`John L. Villalovos2022-07-201-0/+43
|/ | | | | | | | This can be used to tell if a `RESTObject` was created using `lazy=True`. Add a message to the `AttributeError` if attribute access fails for an instance created with `lazy=True`.
* test: add more tests for container registriesNejc Habjan2022-07-201-4/+50
|
* feat(groups): add support for group-level registry repositoriesNejc Habjan2022-07-201-0/+47
|
* feat: support validating CI lint resultsNejc Habjan2022-07-091-8/+36
|
* feat(cli): add support for global CI lintNejc Habjan2022-07-051-11/+33
|
* refactor(objects): move ci lint to separate fileNejc Habjan2022-07-052-46/+49
|
* feat(objects): add Project CI Lint supportJohn L. Villalovos2022-07-041-0/+46
| | | | | | Add support for validating a project's CI configuration [1] [1] https://docs.gitlab.com/ee/api/lint.html
* feat: add support for group push rulesO'Keefe, Gerard (Gerry)2022-07-041-0/+103
| | | | | | Add the GroupPushRules and GroupPushRulesManager classes. Closes: #1259
* Merge pull request #2069 from antoineauger/test/unit-tests-projectsNejc Habjan2022-06-293-107/+538
|\ | | | | test(projects): add unit tests for projects
| * refactor(test-projects): apply suggestions and use fixturesAntoine Auger2022-06-291-27/+26
| |
| * refactor(test-projects): remove test_restore_projectAntoine Auger2022-06-161-5/+0
| |
| * test(projects): add unit tests for projectsAntoine Auger2022-06-163-100/+537
| |
* | feat(api): add support for `get` for a MR approval ruleJohn L. Villalovos2022-06-271-0/+18
| | | | | | | | | | | | | | | | | | In GitLab 14.10 they added support to get a single merge request approval rule [1] Add support for it to ProjectMergeRequestApprovalRuleManager [1] https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-a-single-merge-request-level-rule
* | test: add tests and clean up usage for new enumsNejc Habjan2022-06-272-13/+40
| |
* | refactor: avoid possible breaking change in iterator (#2107)John Villalovos2022-06-271-1/+1
| | | | | | | | | | | | | | | | Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently introduced a possible breaking change as it added a new argument `iterator` and added it in between existing (potentially positional) arguments. This moves the `iterator` argument to the end of the argument list and requires it to be a keyword-only argument.
* | feat(downloads): allow streaming downloads access to response iterator (#1956)Tom Catshoek2022-06-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(downloads): allow streaming downloads access to response iterator Allow access to the underlying response iterator when downloading in streaming mode by specifying `iterator=True`. Update type annotations to support this change. * docs(api-docs): add iterator example to artifact download Document the usage of the `iterator=True` option when downloading artifacts * test(packages): add tests for streaming downloads
* | Merge pull request #2061 from bgamari/patch-1Nejc Habjan2022-06-251-0/+34
|\ \ | | | | | | feat(users): add approve and reject methods to User
| * | feat(users): add approve and reject methods to UserBen Gamari2022-06-251-0/+34
| | | | | | | | | | | | | | | | | | As requested in #1604. Co-authored-by: John Villalovos <john@sodarock.com>
* | | feat(api): support head() method for get and list endpointsNejc Habjan2022-06-251-0/+21
| | |
* | | test(api): add tests for HEAD methodNejc Habjan2022-06-251-0/+16
|/ /
* | feat: Add support for Protected Environmentscalve2022-06-221-1/+26
| | | | | | | | | | | | | | | | - https://docs.gitlab.com/ee/api/protected_environments.html - https://github.com/python-gitlab/python-gitlab/issues/1130 no write operation are implemented yet as I have no use case right now and am not sure how it should be done
* | fix(base): do not fail repr() on lazy objectsNejc Habjan2022-06-201-0/+4
| |
* | Merge pull request #2066 from python-gitlab/jlvillal/approval_rule_idNejc Habjan2022-06-201-0/+1
|\ \ | |/ |/| fix(cli): project-merge-request-approval-rule
| * fix(cli): project-merge-request-approval-ruleJohn L. Villalovos2022-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the CLI the command: gitlab project-merge-request-approval-rule list --mr-iid 1 --project-id foo/bar Would raise an exception. This was due to the fact that `_id_attr` and `_repr_attr` were set for keys which are not returned in the response. Add a unit test which shows the `repr` function now works. Before it did not. This is an EE feature so we can't functional test it. Closes: #2065