Skip to content

Commit

Permalink
Remove default url
Browse files Browse the repository at this point in the history
  • Loading branch information
ways committed Nov 20, 2024
1 parent b55b416 commit 369e223
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion sedr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
def main() -> None:
# show-capture=no means hide stdout/stderr. Should change debug output instead.
pytest.main(["-rA", "--show-capture=no", "./sedr/schemat.py"])
# pytest.main(["-rA", "./sedr/schemat.py"])


# Handle --version and --help
Expand Down
5 changes: 2 additions & 3 deletions sedr/schemat.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ def set_up_schemathesis(args) -> BaseOpenAPISchema:
util.logger.info("Using EDR version %s", edreq.__edr_version__)

if args.openapi.startswith("http"):
util.logger.info("Testing site %s using OpenAPI spec <%s>", args.url, args.openapi)
return schemathesis.from_uri(uri=args.openapi, base_url=args.url)

util.logger.info(
"openapi <%s> doesn't seem to be a URL, opening as path.", util.args.openapi
)
util.logger.info("Testing site %s using local OpenAPI spec at path <%s>", args.url, args.openapi)
return schemathesis.from_path(path=util.args.openapi, base_url=args.url)


Expand Down
1 change: 1 addition & 0 deletions sedr/test_schemat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import unittest
import util
import pytest


class TestInit(unittest.TestCase):
Expand Down
5 changes: 2 additions & 3 deletions sedr/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
__author__ = "Lars Falk-Petersen"
__license__ = "GPL-3.0"

args = None
logger = logging.getLogger(__file__)
args = logger = None


def parse_args(args, version: str = "") -> argparse.Namespace:
Expand All @@ -25,7 +24,7 @@ def parse_args(args, version: str = "") -> argparse.Namespace:
default="",
)
parser.add_argument(
"--url", type=str, help="URL to API", default="https://edrisobaric.k8s.met.no"
"--url", type=str, help="URL to API", default=""
)
parser.add_argument(
"--iterations",
Expand Down

0 comments on commit 369e223

Please sign in to comment.