From: Karl O. Pinc Date: Sun, 13 Sep 2020 00:20:50 +0000 (-0500) Subject: Log (debug) when done autoconfiguring components X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=0a0f743a5f356bb6c41f10adbc13ea9d37df2d13;p=pgwui_server Log (debug) when done autoconfiguring components --- diff --git a/src/pgwui_server/__init__.py b/src/pgwui_server/__init__.py index 2db01be..eb3b7c3 100644 --- a/src/pgwui_server/__init__.py +++ b/src/pgwui_server/__init__.py @@ -182,6 +182,7 @@ def apply_component_defaults(settings, components): log.debug('Autoconfiguring PGWUI component: {}'.format(component)) config.include(component) add_routes(config, settings) + log.debug('Done autoconfiguring PGWUI components') return config diff --git a/tests/test___init__.py b/tests/test___init__.py index 95ad04c..9b86c39 100644 --- a/tests/test___init__.py +++ b/tests/test___init__.py @@ -482,10 +482,11 @@ def test_apply_component_defaults(monkeypatch, caplog, logs = caplog.record_tuples - assert len(logs) == 1 + assert len(logs) == 2 # One for the single autoconfig, one for finishing - level = logs[0][1] - assert level == logging.DEBUG + for log in logs: + level = log[1] + assert level == logging.DEBUG mock_apply_component_defaults = testing.make_mock_fixture(