From 80b8802cd713bf70c9df00b103b3f69301b715ef Mon Sep 17 00:00:00 2001 From: Lars Falk-Petersen Date: Tue, 19 Nov 2024 16:33:50 +0100 Subject: [PATCH] Prepare for more testing --- sedr/test_schemat.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/sedr/test_schemat.py b/sedr/test_schemat.py index c62fe4f..2cd9b72 100644 --- a/sedr/test_schemat.py +++ b/sedr/test_schemat.py @@ -20,20 +20,23 @@ def test_set_up_schemathesis(self): schemat.schema = schemat.set_up_schemathesis(util.args) self.assertTrue(schemat.schema) - # def test_edr_landingpage(self): - # """Test test_edr_landingpage.""" - # __version__ = "testversion" + def test_edr_landingpage(self): + """Test test_edr_landingpage with a local json.""" + __version__ = "testversion" - # util.args = util.parse_args([], __version__) - # util.args.openapi_version == "3.1" + util.args = util.parse_args([], __version__) + util.args.openapi_version == "3.1" - # util.logger = util.set_up_logging( - # args=util.args, logfile=util.args.log_file, version=__version__ - # ) - # import schemat + util.logger = util.set_up_logging( + args=util.args, logfile=util.args.log_file, version=__version__ + ) + import schemathesis + import schemat - # schemat.schema = schemat.set_up_schemathesis(util.args) + schemat.schema = schemathesis.from_path( + path="testdata/edrisobaric_openapi.json" + ) - # TODO: Need to set up a case to run this - # t = schemat.test_edr_landingpage() - # self.assertTrue(t) + # TODO + # t = schemat.test_edr_landingpage(schemat.schema) + # self.assertTrue(t)