summaryrefslogtreecommitdiff
path: root/tests/unit/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* chore: replace usage of utils._url_encode() with utils.EncodedId()jlvillal/encoded_idJohn L. Villalovos2022-01-131-23/+2
| | | | | | utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don't need it.
* chore: add EncodedId string class to use to hold URL-encoded pathsJohn L. Villalovos2022-01-131-0/+62
| | | | | | | | | Add EncodedId string class. This class returns a URL-encoded string but ensures it will only URL-encode it once even if recursively called. Also added some functional tests of 'lazy' objects to make sure they work.
* fix: remove custom URL encodingJohn L. Villalovos2022-01-081-4/+9
| | | | | | | | | | We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils._url_encode()` function which itself uses `urllib.parse.quote()` Closes: #1356
* fix: stop encoding '.' to '%2E'jlvillal/leave_dotJohn L. Villalovos2021-12-201-10/+0
| | | | | | | | | | | | | | | | | | | | Forcing the encoding of '.' to '%2E' causes issues. It also goes against the RFC: https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3 From the RFC: For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers... Closes #1006 Related #1356 Related #1561 BREAKING CHANGE: stop encoding '.' to '%2E'. This could potentially be a breaking change for users who have incorrectly configured GitLab servers which don't handle period '.' characters correctly.
* chore: move 'gitlab/tests/' dir to 'tests/unit/'John L. Villalovos2021-05-261-0/+42
Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the tests located under the 'tests/' directory.