summaryrefslogtreecommitdiff
path: root/tests/unit/objects/test_appearance.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-12-01 01:04:53 +0100
committerGitHub <noreply@github.com>2021-12-01 01:04:53 +0100
commit8d76826fa64460e504acc5924f859f8dbc246b42 (patch)
tree083fefada982c795e2415092794db429abb0c184 /tests/unit/objects/test_appearance.py
parent5a1678f43184bd459132102cc13cf8426fe0449d (diff)
parent86ab04e54ea4175f10053decfad5086cda7aa024 (diff)
downloadgitlab-master.tar.gz
Merge pull request #1723 from python-gitlab/jlvillal/dead_mastermaster
Close-out `master` branch
Diffstat (limited to 'tests/unit/objects/test_appearance.py')
-rw-r--r--tests/unit/objects/test_appearance.py65
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/unit/objects/test_appearance.py b/tests/unit/objects/test_appearance.py
deleted file mode 100644
index 0de6524..0000000
--- a/tests/unit/objects/test_appearance.py
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-GitLab API: https://docs.gitlab.com/ce/api/appearance.html
-"""
-
-import pytest
-import responses
-
-title = "GitLab Test Instance"
-description = "gitlab-test.example.com"
-new_title = "new-title"
-new_description = "new-description"
-
-
-@pytest.fixture
-def resp_application_appearance():
- content = {
- "title": title,
- "description": description,
- "logo": "/uploads/-/system/appearance/logo/1/logo.png",
- "header_logo": "/uploads/-/system/appearance/header_logo/1/header.png",
- "favicon": "/uploads/-/system/appearance/favicon/1/favicon.png",
- "new_project_guidelines": "Please read the FAQs for help.",
- "header_message": "",
- "footer_message": "",
- "message_background_color": "#e75e40",
- "message_font_color": "#ffffff",
- "email_header_and_footer_enabled": False,
- }
-
- with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps:
- rsps.add(
- method=responses.GET,
- url="http://localhost/api/v4/application/appearance",
- json=content,
- content_type="application/json",
- status=200,
- )
-
- updated_content = dict(content)
- updated_content["title"] = new_title
- updated_content["description"] = new_description
-
- rsps.add(
- method=responses.PUT,
- url="http://localhost/api/v4/application/appearance",
- json=updated_content,
- content_type="application/json",
- status=200,
- )
- yield rsps
-
-
-def test_get_update_appearance(gl, resp_application_appearance):
- appearance = gl.appearance.get()
- assert appearance.title == title
- assert appearance.description == description
- appearance.title = new_title
- appearance.description = new_description
- appearance.save()
- assert appearance.title == new_title
- assert appearance.description == new_description
-
-
-def test_update_appearance(gl, resp_application_appearance):
- gl.appearance.update(title=new_title, description=new_description)