diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-11-26 15:59:20 +0100 |
---|---|---|
committer | Nejc Habjan <nejc.habjan@siemens.com> | 2022-11-26 15:59:20 +0100 |
commit | 875140296fada3659d224e3a5819ba77a81e36fe (patch) | |
tree | 5ed1344e9b1f265eb673341689a84a39f1527aa7 /tests | |
parent | 0ecf3bbe28c92fd26a7d132bf7f5ae9481cbad30 (diff) | |
download | gitlab-feat/decode-to-string.tar.gz |
feat(files): allow decoding project files directly to stringfeat/decode-to-string
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/api/test_repository.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/functional/api/test_repository.py b/tests/functional/api/test_repository.py index dd70f10..a7c2917 100644 --- a/tests/functional/api/test_repository.py +++ b/tests/functional/api/test_repository.py @@ -36,9 +36,9 @@ def test_repository_files(project): } ) readme = project.files.get(file_path="README.rst", ref="main") - # The first decode() is the ProjectFile method, the second one is the bytes - # object method - assert readme.decode().decode() == "Initial content" + + assert readme.decode() == b"Initial content" + assert readme.decode("utf-8") == "Initial content" headers = project.files.head("README.rst", ref="main") assert headers["X-Gitlab-File-Path"] == "README.rst" |