Skip to content

Commit

Permalink
tests: improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Feb 26, 2024
1 parent 5332705 commit 78a77cd
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions ckanext/dcor_theme/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,21 @@
import ckanext.dcor_theme.plugin as plugin # noqa: F401


def test_plugin():
pass
class BlueprintChecker:
def add_url_rule(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs


def test_plugin_get_blueprint():
p = plugin.DCORThemePlugin()
blueprint = p.get_blueprint()
funcs = blueprint.deferred_functions
endpoints = []
for func in funcs:
checker = BlueprintChecker()
func(checker)
endpoints.append(checker.args[1])
assert "contact" in endpoints
assert "imprint" in endpoints
assert "privacy" in endpoints

0 comments on commit 78a77cd

Please sign in to comment.