Default pgwui.autoconfigure to True
authorKarl O. Pinc <kop@karlpinc.com>
Wed, 9 Sep 2020 20:51:57 +0000 (15:51 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Wed, 9 Sep 2020 20:51:57 +0000 (15:51 -0500)
src/pgwui_server/__init__.py
tests/test___init__.py

index fe0488b086032237687822bb7ddc3fddb89d7339..3023bb9e58b3c3024abaf93bcd99c31687d690d3 100644 (file)
@@ -203,7 +203,7 @@ def add_routes(config, settings):
 def autoconfigurable_components(settings, components):
     '''Automatic pgwui component discovery
     '''
-    autoconfig = settings.get('pgwui.autoconfigure')
+    autoconfig = settings.get('pgwui.autoconfigure', True)
     if not autoconfig:
         return []
 
index da17a2f6fd403a3ce40c154ef6f4d860a0b71494..52e03410ce880d1fdefa5071f64ec49c813dab12 100644 (file)
@@ -499,7 +499,8 @@ def test_autoconfiguable_components_no_autoconfig():
     '''
     test_components = ['some', 'components']
 
-    result = pgwui_server_init.autoconfigurable_components({}, test_components)
+    result = pgwui_server_init.autoconfigurable_components(
+        {'pgwui.autoconfigure': False}, test_components)
 
     assert result == []