Skip to content

Commit

Permalink
added two config tests
Browse files Browse the repository at this point in the history
  • Loading branch information
voisardf committed Aug 29, 2024
1 parent d8c72db commit 7296571
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pyramid_oereb:
wms_url_params:
TRANSPARENT: 'true'
OTHERCUSTOM: 'myvalue'
compute_toc_pages: false
default_toc_length: 2

theme:
source:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@ def test_default_wms_url_param_config(DummyRenderInfo):
config = renderer.get_wms_url_params()
# Do the check for this test. Value should be the default setting.
assert config == {'TRANSPARENT': 'true'}


def test_toc_pages_default_config():
Config._config = None
Config.init('./tests/contrib.print_proxy.mapfish_print/resources/test_config.yml', 'pyramid_oereb')
compute_toc_pages = Config.get('print', {}).get('compute_toc_pages')
default_toc_length = Config.get('print', {}).get('default_toc_length')

assert compute_toc_pages == False
assert default_toc_length == 2

0 comments on commit 7296571

Please sign in to comment.