Fix #30: added instance preferences for name and descriptions
This commit is contained in:
parent
b4ace3c9dd
commit
cdabb26989
2 changed files with 46 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from dynamic_preferences.api import serializers
|
||||
|
|
@ -20,3 +22,14 @@ def test_can_list_settings_via_api(preferences, api_client):
|
|||
for p in response.data:
|
||||
i = '__'.join([p['section'], p['name']])
|
||||
assert i in expected_preferences
|
||||
|
||||
|
||||
@pytest.mark.parametrize('pref,value', [
|
||||
('instance__name', 'My instance'),
|
||||
('instance__short_description', 'For music lovers'),
|
||||
('instance__long_description', 'For real music lovers'),
|
||||
])
|
||||
def test_instance_settings(pref, value, preferences):
|
||||
preferences[pref] = value
|
||||
|
||||
assert preferences[pref] == value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue