Skip to content

Commit

Permalink
try to load jsonschema
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed Sep 27, 2023
1 parent e355a7c commit b824ac0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/unit/test_zowe_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

# Including necessary paths
import base64
import commentjson
import importlib.util
import json
import keyring
import os
import shutil
import keyring
import sys
import unittest

from jsonschema import validate, ValidationError, SchemaError
from pyfakefs.fake_filesystem_unittest import TestCase
from unittest import mock
from unittest.mock import patch
from jsonschema import validate, ValidationError, SchemaError

from zowe.core_for_zowe_sdk.validators import validate_config_json
import commentjson
from pyfakefs.fake_filesystem_unittest import TestCase
from zowe.core_for_zowe_sdk import (
ApiConnection,
ConfigFile,
Expand Down Expand Up @@ -207,7 +209,11 @@ def setUp(self):
self.original_invalidUri_schema_file_path = os.path.join(
FIXTURES_PATH, "invalidUri.zowe.schema.json"
)
# self.fs.add_real_directory(os.path.join(FIXTURES_PATH, "../../../env/lib"))

loader = importlib.util.find_spec('jsonschema')
module_path = loader.origin
self.fs.add_real_directory(os.path.dirname(module_path))

self.fs.add_real_file(self.original_file_path)
self.fs.add_real_file(self.original_user_file_path)
self.fs.add_real_file(self.original_nested_file_path)
Expand Down

0 comments on commit b824ac0

Please sign in to comment.