summaryrefslogtreecommitdiff
path: root/jsonschema/tests/test_cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'jsonschema/tests/test_cli.py')
-rw-r--r--jsonschema/tests/test_cli.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/jsonschema/tests/test_cli.py b/jsonschema/tests/test_cli.py
index 84f8812..c5b0b2e 100644
--- a/jsonschema/tests/test_cli.py
+++ b/jsonschema/tests/test_cli.py
@@ -16,13 +16,11 @@ try: # pragma: no cover
except ImportError: # pragma: no cover
import importlib_metadata as metadata # type: ignore
-from pyrsistent import m
-
from jsonschema import Draft4Validator, Draft202012Validator
from jsonschema.exceptions import (
- RefResolutionError,
SchemaError,
ValidationError,
+ _RefResolutionError,
)
from jsonschema.validators import _LATEST_VERSION, validate
@@ -70,13 +68,13 @@ def _message_for(non_json):
class TestCLI(TestCase):
def run_cli(
- self, argv, files=m(), stdin=StringIO(), exit_code=0, **override,
+ self, argv, files=None, stdin=StringIO(), exit_code=0, **override,
):
arguments = cli.parse_args(argv)
arguments.update(override)
self.assertFalse(hasattr(cli, "open"))
- cli.open = fake_open(files)
+ cli.open = fake_open(files or {})
try:
stdout, stderr = StringIO(), StringIO()
actual_exit_code = cli.run(
@@ -747,7 +745,7 @@ class TestCLI(TestCase):
schema = '{"$ref": "someNonexistentFile.json#definitions/num"}'
instance = "1"
- with self.assertRaises(RefResolutionError) as e:
+ with self.assertRaises(_RefResolutionError) as e:
self.assertOutputs(
files=dict(
some_schema=schema,
@@ -766,7 +764,7 @@ class TestCLI(TestCase):
schema = '{"$ref": "foo.json#definitions/num"}'
instance = "1"
- with self.assertRaises(RefResolutionError) as e:
+ with self.assertRaises(_RefResolutionError) as e:
self.assertOutputs(
files=dict(
some_schema=schema,