Tests for app_logo
This commit is contained in:
parent
97e25f26aa
commit
60f37090d9
@ -50,6 +50,7 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase):
|
||||
"max_image_pixels": None,
|
||||
"color_conversion_strategy": None,
|
||||
"app_title": None,
|
||||
"app_logo": None,
|
||||
},
|
||||
),
|
||||
)
|
||||
@ -57,19 +58,21 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase):
|
||||
def test_api_get_ui_settings_with_config(self):
|
||||
"""
|
||||
GIVEN:
|
||||
- Existing config with app_title specified
|
||||
- Existing config with app_title, app_logo specified
|
||||
WHEN:
|
||||
- API to retrieve uisettings is called
|
||||
THEN:
|
||||
- app_title is included
|
||||
- app_title and app_logo are included
|
||||
"""
|
||||
config = ApplicationConfiguration.objects.first()
|
||||
config.app_title = "Fancy New Title"
|
||||
config.app_logo = "/logo/example.jpg"
|
||||
config.save()
|
||||
response = self.client.get("/api/ui_settings/", format="json")
|
||||
self.assertDictContainsSubset(
|
||||
{
|
||||
"app_title": config.app_title,
|
||||
"app_logo": config.app_logo,
|
||||
},
|
||||
response.data["settings"],
|
||||
)
|
||||
|
@ -36,6 +36,7 @@ class TestApiUiSettings(DirectoriesMixin, APITestCase):
|
||||
response.data["settings"],
|
||||
{
|
||||
"app_title": None,
|
||||
"app_logo": None,
|
||||
"update_checking": {
|
||||
"backend_setting": "default",
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user