summaryrefslogtreecommitdiff
path: root/tests/unit/mixins
Commit message (Collapse)AuthorAgeFilesLines
* chore: consolidate license and authorsNejc Habjan2022-08-041-18/+0
|
* fix: use the [] after key names for array variables in `params`John L. Villalovos2022-07-271-0/+38
| | | | | | | | | | | | | | | | | | 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
* fix: add `get_all` param (and `--get-all`) to allow passing `all` to APINejc Habjan2022-07-211-1/+1
|
* 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`.
* feat(api): support head() method for get and list endpointsNejc Habjan2022-06-251-0/+21
|
* chore: move `utils._validate_attrs` inside `types.RequiredOptional`John L. Villalovos2022-05-311-5/+4
| | | | | | Move the `validate_attrs` function to be inside the `RequiredOptional` class. It makes sense for it to be part of the class as it is working on data related to the class.
* feat: support mutually exclusive attributes and consolidate validation to ↵Walter Rowe2022-05-311-4/+5
| | | | | | | | | | | | | | | fix board lists (#2037) add exclusive tuple to RequiredOptional data class to support for mutually exclusive attributes consolidate _check_missing_create_attrs and _check_missing_update_attrs from mixins.py into _validate_attrs in utils.py change _create_attrs in board list manager classes from required=('label_ld',) to exclusive=('label_id','asignee_id','milestone_id') closes https://github.com/python-gitlab/python-gitlab/issues/1897
* chore: move `RequiredOptional` to the `gitlab.types` moduleJohn L. Villalovos2022-05-311-10/+11
| | | | | | By having `RequiredOptional` in the `gitlab.base` module it makes it difficult with circular imports. Move it to the `gitlab.types` module which has no dependencies on any other gitlab module.
* test(gitlab): increase unit test coverageNejc Habjan2022-05-291-0/+55
|
* feat(client): introduce `iterator=True` and deprecate `as_list=False` in ↵John L. Villalovos2022-05-291-2/+2
| | | | | | | | | | | `list()` `as_list=False` is confusing as it doesn't explain what is being returned. Replace it with `iterator=True` which more clearly explains to the user that an iterator/generator will be returned. This maintains backward compatibility with `as_list` but does issue a DeprecationWarning if `as_list` is set.
* test: convert usage of `match_querystring` to `match`jlvillal/rm_httmockJohn L. Villalovos2022-01-161-12/+12
| | | | | In the `responses` library the usage of `match_querystring` is deprecated. Convert to using `match`
* test: use 'responses' in test_mixins_methods.pyJohn L. Villalovos2022-01-141-146/+191
| | | | | | Convert from httmock to responses in test_mixins_methods.py This leaves only one file left to convert
* chore: fix mypy pre-commit hookNejc Habjan2021-08-221-0/+0
|
* chore: move 'gitlab/tests/' dir to 'tests/unit/'John L. Villalovos2021-05-263-0/+437
Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the tests located under the 'tests/' directory.