From a2d79f49b900a9ca9e7e1f6d44484c902f09f85d Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Wed, 1 Dec 2021 17:02:23 +0100 Subject: [PATCH] [tests] dummy domain test (you can use this example in your own domain) --- halfapi/cli/domain.py | 1 + tests/test_domain.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/test_domain.py diff --git a/halfapi/cli/domain.py b/halfapi/cli/domain.py index 25d1946..fb1835b 100644 --- a/halfapi/cli/domain.py +++ b/halfapi/cli/domain.py @@ -156,3 +156,4 @@ def domain(domain, delete, update, create, read): #, domains, read, create, upd default=ORJSONResponse.default_cast) ) + sys.exit(0) diff --git a/tests/test_domain.py b/tests/test_domain.py new file mode 100644 index 0000000..8e47dc6 --- /dev/null +++ b/tests/test_domain.py @@ -0,0 +1,10 @@ +from halfapi.testing.test_domain import TestDomain +from dummy_domain import __name__, __routers__ +from pprint import pprint + +class TestDummyDomain(TestDomain): + DOMAIN = __name__ + ROUTERS = __routers__ + + def test_domain(self): + self.check_domain()