diff --git a/hobo/debug/views.py b/hobo/debug/views.py index 6b6a14c..df5a544 100644 --- a/hobo/debug/views.py +++ b/hobo/debug/views.py @@ -34,7 +34,7 @@ class HomeView(FormView): @cached_property def debug_ips_variable(self): - return get_setting_variable('INTERNAL_IPS') + return get_setting_variable('INTERNAL_IPS.extend') def get_initial(self): initial = super(HomeView, self).get_initial() diff --git a/tests/test_manager.py b/tests/test_manager.py index c6519fb..0175689 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -127,28 +127,28 @@ def test_debug_home(logged_app): page = page.form.submit().follow() assert get_setting_variable('DEBUG_LOG').json is True - assert get_setting_variable('INTERNAL_IPS').json == IP_LIST + assert get_setting_variable('INTERNAL_IPS.extend').json == IP_LIST hobo_json = get_installed_services_dict() assert hobo_json['variables']['SETTING_DEBUG_LOG'] is True - assert hobo_json['variables']['SETTING_INTERNAL_IPS'] == IP_LIST + assert hobo_json['variables']['SETTING_INTERNAL_IPS.extend'] == IP_LIST page.form['debug_log'] = False page.form['debug_ips'] = '' page = page.form.submit().follow() assert get_setting_variable('DEBUG_LOG').json is False - assert get_setting_variable('INTERNAL_IPS').json == [] + assert get_setting_variable('INTERNAL_IPS.extend').json == [] hobo_json = get_installed_services_dict() assert hobo_json['variables']['SETTING_DEBUG_LOG'] is False - assert hobo_json['variables']['SETTING_INTERNAL_IPS'] == [] + assert hobo_json['variables']['SETTING_INTERNAL_IPS.extend'] == [] # toggle-current-ip button page = logged_app.get('/debug/') page.form['debug_ips'] = IPS page = page.form.submit(name='toggle-current-ip').follow() # click - assert get_setting_variable('INTERNAL_IPS').json == IP_LIST + ['127.0.0.1'] + assert get_setting_variable('INTERNAL_IPS.extend').json == IP_LIST + ['127.0.0.1'] page = page.form.submit(name='toggle-current-ip').follow() # click again - assert get_setting_variable('INTERNAL_IPS').json == IP_LIST + assert get_setting_variable('INTERNAL_IPS.extend').json == IP_LIST # wrong ips are not returned as a list page = logged_app.get('/debug/')