Repository: networktocode/jdiff (language: python)

Issue:
Rename lib in jdiff
So we can reserve the name on PyPi repo




Discussion / hints:

Fix patch:
diff --git a/.bandit.yml b/.bandit.yml
index 149f2ea..781fb8f 100644
--- a/.bandit.yml
+++ b/.bandit.yml
@@ -3,4 +3,4 @@ skips: []
 # No need to check for security issues in the test scripts!
 exclude_dirs:
   - "./tests/"
-  - "./netcompare/tests/"
+  - "./jdiff/tests/"
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 659513e..9e1e50f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,11 +1,11 @@
 ---
 name: 🐛 Bug Report
-about: Report a reproducible bug in the current release of netcompare
+about: Report a reproducible bug in the current release of jdiff
 ---
 
 ### Environment
 * Python version:  <!-- Example: 3.7.7 -->
-* netcompare version:  <!-- Example: 1.0.0 -->
+* jdiff version:  <!-- Example: 1.0.0 -->
 
 <!-- What did you expect to happen? -->
 ### Expected Behavior
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index d579533..0fea2d3 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -5,7 +5,7 @@ about: Propose a new feature or enhancement
 ---
 
 ### Environment
-* netcompare version:  <!-- Example: 1.0.0 -->
+* jdiff version:  <!-- Example: 1.0.0 -->
 
 <!--
     Describe in detail the new functionality you are proposing.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c1ed5ae..7503047 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy rule:comments
   - "pull_request"
 
 env:
-  IMAGE_NAME: "netcompare"
+  IMAGE_NAME: "jdiff"
 
 jobs:
   black:
diff --git a/README.md b/README.md
index 561a205..703474c 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
-# netcompare
+# jdiff
 
-The `netcompare` is a light-weight library to examine structured data. `netcompare` provides an interface to intelligently compare json data objects as well as test for the presence (or absence) of keys, and to examine and compare their values.
+The `jdiff` is a light-weight library to examine structured data. `jdiff` provides an interface to intelligently compare json data objects as well as test for the presence (or absence) of keys, and to examine and compare their values.
 
 The library heavily relies on [jmespath](https://jmespath.org/) for traversing the json object and finding the value(s) to be evaluated. More on that [here](#customized-jmespath).
 
 ## Usage
 
-A `netcompare` Check accepts two objects as input: the reference object, and the comparison object. The reference object is used as the intended or accepted state and it's keys and values are compared against the comparison object.
+A `jdiff` Check accepts two objects as input: the reference object, and the comparison object. The reference object is used as the intended or accepted state and it's keys and values are compared against the comparison object.
 
-`netcompare` does not collect the data for you, it simply works on data passed into it. This allows for maximum flexibility in collecting the data. 
+`jdiff` does not collect the data for you, it simply works on data passed into it. This allows for maximum flexibility in collecting the data. 
 
 For instance, the reference state can be collected from the network directly using any method that returns structured data: ansible, napalm, nornir to name a few. You could also choose to generate the reference state from an SoT, such as [Nautobot](https://github.com/nautobot/nautobot/), and have a true intended state. 
 
-`netcompare` is perfectly suited to work with data gathered from network devices via show commands, Ansible playbooks, as well as in applications such as [Nautobot](https://github.com/nautobot/nautobot/), or [Netbox](https://github.com/netbox-community/netbox). `netcompare` is focused on being the 'plumbing' behind a full network automation validation solution. 
+`jdiff` is perfectly suited to work with data gathered from network devices via show commands, Ansible playbooks, as well as in applications such as [Nautobot](https://github.com/nautobot/nautobot/), or [Netbox](https://github.com/netbox-community/netbox). `jdiff` is focused on being the 'plumbing' behind a full network automation validation solution. 
 
 ### Testing data structures
 
@@ -29,9 +29,9 @@ Briefly, these tests, or `CheckTypes`, are provided to test the objects, to aide
 
 ## Workflow
 
-| ![netcompare workflow](./docs/images/workflow.png) |
+| ![jdiff workflow](./docs/images/workflow.png) |
 |:---:|
-| **`netcompare` workflow** |
+| **`jdiff` workflow** |
 
 
 1. The reference state object is assembled. The structured data may be collected from: 
@@ -41,13 +41,13 @@ Briefly, these tests, or `CheckTypes`, are provided to test the objects, to aide
 
 2. The Network Engineer makes changes to the network, whether it is an upgrade, peering change, or migration.
 3. The comparison state is collected, typically directly from the network, but any method is acceptable.
-4. The reference state is then compared to the current state using the netcompare library.
+4. The reference state is then compared to the current state using the jdiff library.
 
 ## Library Architecture
 
-| ![netcompare HLD](./docs/images/hld.png) |
+| ![jdiff HLD](./docs/images/hld.png) |
 |:---:|
-| **`netcompare` architecture** |
+| **`jdiff` architecture** |
 
 An instance of `CheckType` object must be created first before passing one of the below check types as an argument:
 
@@ -63,7 +63,7 @@ my_check = "exact_match"
 check = CheckType.init(my_check)
 ```
 
-Next, define a json object as reference data, as well as a JMESPATH expression to extract the value wanted and pass them to `get_value` method. Be aware! `netcompare` works with a customized version of JMESPATH. More on that [below](#customized-jmespath).
+Next, define a json object as reference data, as well as a JMESPATH expression to extract the value wanted and pass them to `get_value` method. Be aware! `jdiff` works with a customized version of JMESPATH. More on that [below](#customized-jmespath).
 
 ```python
 bgp_pre_change = "./pre/bgp.json"
@@ -88,7 +88,7 @@ results = check.evaluate(post_value, pre_value, **evaluate_args)
 
 ## Customized JMESPATH
 
-Since `netcompare` works with json objects as data inputs, JMESPATH was the obvious choice for traversing the data and extracting the value(s) to compare.
+Since `jdiff` works with json objects as data inputs, JMESPATH was the obvious choice for traversing the data and extracting the value(s) to compare.
 
 However, JMESPATH comes with a limitation where is not possible to define a `key` to which the `value` belongs to.
 
@@ -142,7 +142,7 @@ A JMESPATH expression to extract `state` is shown below.
 ```
 
 How can we understand that `Idle` is relative to peer 7.7.7.7 and `Connected` to peer `10.1.0.0` ? 
-We could index the output but that would require some post-processing of the data. For that reason, `netcompare` use a customized version of JMESPATH where it is possible to define a reference key for the value(s) wanted. The reference key must be within `$` sign anchors and defined in a list, together with the value(s):
+We could index the output but that would require some post-processing of the data. For that reason, `jdiff` use a customized version of JMESPATH where it is possible to define a reference key for the value(s) wanted. The reference key must be within `$` sign anchors and defined in a list, together with the value(s):
 
 ```python
 "result[0].vrfs.default.peerList[*].[$peerAddress$,state]
@@ -166,7 +166,7 @@ Examples:
 
 
 ```python
->>> from netcompare import CheckType
+>>> from jdiff import CheckType
 >>> pre_data = {
       "jsonrpc": "2.0",
       "id": "EapiExplorer-1",
@@ -224,7 +224,7 @@ Examples:
 >>> # Create an instance of CheckType object with 'exact_match' as check-type argument.
 >>> my_check = CheckType.init(check_type="exact_match")
 >>> my_check
->>> <netcompare.check_types.ExactMatchType object at 0x10ac00f10>
+>>> <jdiff.check_types.ExactMatchType object at 0x10ac00f10>
 >>> # Extract the wanted value from pre_dat to later compare with post_data. As we want compare all the body (excluding "interfaceStatistics"), we do not need to define any reference key
 >>> pre_value = my_check.get_value(output=pre_data, path=my_jmspath, exclude=exclude_fields)
 >>> pre_value
@@ -256,7 +256,7 @@ Let's see a better way to run `exact_match` for this specific case. Since we are
 ```
 Targeting only the `interfaceStatus` key, we would need to define a reference key (in this case `$name$`), we would not define any exclusion list. 
 
-The anchor logic for the reference key applies to all check-types available in `netcompare`
+The anchor logic for the reference key applies to all check-types available in `jdiff`
 
 
 ### Tolerance
@@ -329,7 +329,7 @@ Lets have a look to a couple of examples:
 >>> pre_value = my_check.get_value(pre_data, my_jmspath)
 >>> post_value = my_check.get_value(post_data, my_jmspath)
 >>> actual_results = my_check.evaluate(post_value, pre_value, **my_tolerance_arguments)
->>> # Netcompare returns the value that are not within the 10%
+>>> # jdiff returns the value that are not within the 10%
 >>> actual_results
 ({'10.1.0.0': {'accepted_prefixes': {'new_value': 500, 'old_value': 900}, 'received_prefixes': {'new_value': 599, 'old_value': 999}, 'sent_prefixes': {'new_value': 511, 'old_value': 1011}}}, False)
 >>> # Let's difine a higher tolerance 
@@ -443,7 +443,7 @@ Let's run an example where we want to check the `burnedInAddress` key has a stri
 >>> # What if we want "no-match"?
 >>> regex_args = {"regex": "(?:[0-9a-fA-F]:?){12}", "mode": "no-match"}
 >>> result = check.evaluate(value, **regex_args)
->>> # Netcompare return the failing data as the regex match the value
+>>> # jdiff return the failing data as the regex match the value
 >>> result
 ({'Management1': {'burnedInAddress': '08:00:27:e6:b2:f8'}}, False)
 ```
diff --git a/netcompare/__init__.py b/jdiff/__init__.py
similarity index 100%
rename from netcompare/__init__.py
rename to jdiff/__init__.py
diff --git a/netcompare/check_types.py b/jdiff/check_types.py
similarity index 99%
rename from netcompare/check_types.py
rename to jdiff/check_types.py
index 55d194b..f0e491a 100644
--- a/netcompare/check_types.py
+++ b/jdiff/check_types.py
@@ -19,7 +19,7 @@ class CheckType(ABC):
     """Check Type Base Abstract Class."""
 
     @staticmethod
-    def init(check_type: str):
+    def create(check_type: str):
         """Factory pattern to get the appropriate CheckType implementation.
 
         Args:
diff --git a/netcompare/evaluators.py b/jdiff/evaluators.py
similarity index 100%
rename from netcompare/evaluators.py
rename to jdiff/evaluators.py
diff --git a/netcompare/operator.py b/jdiff/operator.py
similarity index 100%
rename from netcompare/operator.py
rename to jdiff/operator.py
diff --git a/netcompare/utils/__init__.py b/jdiff/utils/__init__.py
similarity index 100%
rename from netcompare/utils/__init__.py
rename to jdiff/utils/__init__.py
diff --git a/netcompare/utils/data_normalization.py b/jdiff/utils/data_normalization.py
similarity index 100%
rename from netcompare/utils/data_normalization.py
rename to jdiff/utils/data_normalization.py
diff --git a/netcompare/utils/diff_helpers.py b/jdiff/utils/diff_helpers.py
similarity index 100%
rename from netcompare/utils/diff_helpers.py
rename to jdiff/utils/diff_helpers.py
diff --git a/netcompare/utils/jmespath_parsers.py b/jdiff/utils/jmespath_parsers.py
similarity index 95%
rename from netcompare/utils/jmespath_parsers.py
rename to jdiff/utils/jmespath_parsers.py
index 64ea838..5503eb7 100644
--- a/netcompare/utils/jmespath_parsers.py
+++ b/jdiff/utils/jmespath_parsers.py
@@ -1,8 +1,8 @@
 """
 jmespath expression parsers and related utilities.
 
-This utility interfaces the custom netcompare jmespath expression with the jmespath library.
-From one expression defined in netcompare, we will derive two expressions: one expression that traverse the json output and get the
+This utility interfaces the custom jdiff jmespath expression with the jmespath library.
+From one expression defined in jdiff, we will derive two expressions: one expression that traverse the json output and get the
 evaluated bit of it, the second will target the reference key relative to the value to evaluate. More on README.md
 """
 import re
diff --git a/pyproject.toml b/pyproject.toml
index 400c9e8..b64d2e4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,11 +1,11 @@
 [tool.poetry]
-name = "netcompare"
+name = "jdiff"
 version = "0.0.1-beta.1"
 description = "A light-weight library to compare structured output from network devices show commands."
 authors = ["Network to Code, LLC <info@networktocode.com>"]
 license = "Apache-2.0"
-homepage = "https://github.com/networktocode-llc/netcompare"
-repository = "https://github.com/networktocode-llc/netcompare"
+homepage = "https://github.com/networktocode-llc/jdiff"
+repository = "https://github.com/networktocode-llc/jdiff"
 readme = "README.md"
 keywords = ["json", "diff", "network"]
 classifiers = [


Test patch:
diff --git a/tests/test_data_normalization.py b/tests/test_data_normalization.py
index bc28661..afce4b1 100644
--- a/tests/test_data_normalization.py
+++ b/tests/test_data_normalization.py
@@ -1,6 +1,6 @@
 "Flatten list unit test"
 import pytest
-from netcompare.utils.data_normalization import flatten_list
+from jdiff.utils.data_normalization import flatten_list
 from .utility import ASSERT_FAIL_MESSAGE
 
 
diff --git a/tests/test_diff_generator.py b/tests/test_diff_generator.py
index baaedc3..69e022f 100644
--- a/tests/test_diff_generator.py
+++ b/tests/test_diff_generator.py
@@ -1,7 +1,7 @@
 """Diff generator tests."""
 import pytest
-from netcompare.evaluators import diff_generator
-from netcompare.check_types import CheckType
+from jdiff.evaluators import diff_generator
+from jdiff.check_types import CheckType
 from .utility import load_mocks, ASSERT_FAIL_MESSAGE
 
 
@@ -162,7 +162,7 @@
 )
 
 # Test GitLab Issues
-# Test issue #44: https://github.com/networktocode-llc/netcompare/issues/44
+# Test issue #44: https://github.com/networktocode-llc/jdiff/issues/44
 test_issue_44_case_1 = (
     "raw_novalue_exclude",
     "result[*].interfaces.*.[$name$,interfaceStatus]",
diff --git a/tests/test_diff_helpers.py b/tests/test_diff_helpers.py
index be7eb03..f9728ac 100644
--- a/tests/test_diff_helpers.py
+++ b/tests/test_diff_helpers.py
@@ -1,5 +1,5 @@
 """DIff helpers unit tests."""
-from netcompare.utils.diff_helpers import dict_merger, group_value, fix_deepdiff_key_names, get_diff_iterables_items
+from jdiff.utils.diff_helpers import dict_merger, group_value, fix_deepdiff_key_names, get_diff_iterables_items
 
 
 def test_dict_merger():
diff --git a/tests/test_filter_parsers.py b/tests/test_filter_parsers.py
index a80f4a3..46267ab 100644
--- a/tests/test_filter_parsers.py
+++ b/tests/test_filter_parsers.py
@@ -1,6 +1,6 @@
 "Filter parser unit tests."
 import pytest
-from netcompare.utils.data_normalization import exclude_filter
+from jdiff.utils.data_normalization import exclude_filter
 from .utility import ASSERT_FAIL_MESSAGE
 
 
diff --git a/tests/test_get_value.py b/tests/test_get_value.py
index 13a2974..8f0080a 100644
--- a/tests/test_get_value.py
+++ b/tests/test_get_value.py
@@ -1,6 +1,6 @@
 """Test GitHub issues."""
 import pytest
-from netcompare import CheckType
+from jdiff import CheckType
 
 
 my_data = [{"global": {"peers": {"10.1.0.0": "peer1", "10.2.0.0": "peer2"}}}]
@@ -10,7 +10,7 @@
 def test_jmspath_return_none(data):
     """Handle exception when JMSPath retunr None."""
     my_jmspath = "global[*]"
-    my_check = CheckType.init(check_type="exact_match")
+    my_check = CheckType.create(check_type="exact_match")
     with pytest.raises(TypeError) as error:
         my_check.get_value(output=data, path=my_jmspath)()  # pylint: disable=E0110
 
diff --git a/tests/test_jmespath_parsers.py b/tests/test_jmespath_parsers.py
index ec84e03..3e37728 100644
--- a/tests/test_jmespath_parsers.py
+++ b/tests/test_jmespath_parsers.py
@@ -1,6 +1,6 @@
 """jmespath parser unit tests."""
 import pytest
-from netcompare.utils.jmespath_parsers import (
+from jdiff.utils.jmespath_parsers import (
     jmespath_value_parser,
     jmespath_refkey_parser,
     keys_values_zipper,
diff --git a/tests/test_operators.py b/tests/test_operators.py
index bbb486d..c5768d3 100644
--- a/tests/test_operators.py
+++ b/tests/test_operators.py
@@ -1,6 +1,6 @@
 """Unit tests for operator check-type."""
 import pytest
-from netcompare.check_types import CheckType
+from jdiff.check_types import CheckType
 from .utility import load_json_file, ASSERT_FAIL_MESSAGE
 
 operator_all_same = (
@@ -170,7 +170,7 @@
 @pytest.mark.parametrize("filename, check_type_str, evaluate_args, path, expected_result", operator_all_tests)
 def test_operator(filename, check_type_str, evaluate_args, path, expected_result):
     """Validate all operator check types."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
     # There is not concept of "pre" and "post" in operator.
     data = load_json_file("api", filename)
     value = check.get_value(data, path)
diff --git a/tests/test_sw_upgrade_device_state.py b/tests/test_sw_upgrade_device_state.py
index 683b74d..ffe317c 100644
--- a/tests/test_sw_upgrade_device_state.py
+++ b/tests/test_sw_upgrade_device_state.py
@@ -1,7 +1,7 @@
 """Tests for typical software upgrade device state check."""
 from copy import deepcopy
 import pytest
-from netcompare.check_types import CheckType
+from jdiff.check_types import CheckType
 from .utility import load_json_file
 
 
@@ -21,7 +21,7 @@ def test_show_version(platform, command, jpath, expected_parameter, check_should
     filename = f"{platform}_{command}.json"
     command = load_json_file("sw_upgrade", filename)
 
-    check = CheckType.init("parameter_match")
+    check = CheckType.create("parameter_match")
     value = check.get_value(command, jpath)
     eval_results, passed = check.evaluate(value, expected_parameter, "match")  # pylint: disable=E1121
     assert passed is check_should_pass, f"FAILED, eval_result: {eval_results}"
@@ -50,7 +50,7 @@ def test_show_interfaces_state(platform, command, jpath, check_should_pass):
             command_post[0]["link_status"] = "down"
             command_post[1]["protocol_status"] = "down"
 
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     pre_value = CheckType.get_value(command_pre, jpath)
     post_value = CheckType.get_value(command_post, jpath)
     eval_results, passed = check.evaluate(post_value, pre_value)
@@ -69,7 +69,7 @@ def test_show_ip_route_exact_match(platform, command):
     """Test identical route table pass the test with exact_match."""
     command_pre = command_post = load_json_file("sw_upgrade", f"{platform}_{command}.json")
 
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     eval_results, passed = check.evaluate(command_post, command_pre)
     assert passed is True, f"FAILED, eval_result: {eval_results}"
 
@@ -85,7 +85,7 @@ def test_show_ip_route_exact_match(platform, command):
 def test_show_ip_route_missing_and_additional_routes(platform, command):
     """Test missing or additional routes fail the test with exact_match."""
     command_pre = command_post = load_json_file("sw_upgrade", f"{platform}_{command}.json")
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     print(len(command_pre))
     eval_results_missing, passed_missing = check.evaluate(command_post[:30], command_pre)
     eval_results_additional, passed_additional = check.evaluate(command_post, command_pre[:30])
@@ -114,7 +114,7 @@ def test_bgp_neighbor_state(platform, command, jpath, check_should_pass):
         state_key = "state" if "arista" in platform else "bgp_state"
         command_post[0][state_key] = "Idle"
 
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     pre_value = CheckType.get_value(command_pre, jpath)
     post_value = CheckType.get_value(command_post, jpath)
     eval_results, passed = check.evaluate(post_value, pre_value)
@@ -139,7 +139,7 @@ def test_bgp_prefix_tolerance(platform, command, prfx_post_value, tolerance, che
 
     command_post[1]["state_pfxrcd"] = command_post[1]["state_pfxrcd"] = prfx_post_value
 
-    check = CheckType.init("tolerance")
+    check = CheckType.create("tolerance")
     jpath = "[*].[$bgp_neigh$,state_pfxrcd]"
     pre_value = CheckType.get_value(command_pre, jpath)
     post_value = CheckType.get_value(command_post, jpath)
@@ -168,7 +168,7 @@ def test_ospf_neighbor_state(platform, command, jpath, check_should_pass):
         command_post[0]["state"] = "2WAY"
         command_post = command_post[:1]
 
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     pre_value = CheckType.get_value(command_pre, jpath)
     post_value = CheckType.get_value(command_post, jpath)
     eval_results, passed = check.evaluate(post_value, pre_value)
@@ -199,6 +199,6 @@ def test_lldp_neighbor_state(platform, command, check_should_pass):
     if check_should_pass is False:
         command_post = command_post[:2]
 
-    check = CheckType.init("exact_match")
+    check = CheckType.create("exact_match")
     eval_results, passed = check.evaluate(command_post, command_pre)
     assert passed is check_should_pass, f"FAILED, eval_result: {eval_results}"
diff --git a/tests/test_type_checks.py b/tests/test_type_checks.py
index 99ac67a..8fd024d 100644
--- a/tests/test_type_checks.py
+++ b/tests/test_type_checks.py
@@ -1,6 +1,6 @@
 """Check Type unit tests."""
 import pytest
-from netcompare.check_types import CheckType, ExactMatchType, OperatorType, ToleranceType, ParameterMatchType, RegexType
+from jdiff.check_types import CheckType, ExactMatchType, OperatorType, ToleranceType, ParameterMatchType, RegexType
 from .utility import load_json_file, load_mocks, ASSERT_FAIL_MESSAGE
 
 
@@ -48,7 +48,7 @@ def evaluate(self, *args, **kwargs):
 )
 def test_check_init(check_type_str, expected_class):
     """Validate that the returned class is the expected one."""
-    assert isinstance(CheckType.init(check_type_str), expected_class)
+    assert isinstance(CheckType.create(check_type_str), expected_class)
 
 
 exception_tests_init = [
@@ -60,7 +60,7 @@ def test_check_init(check_type_str, expected_class):
 def tests_exceptions_init(check_type_str, exception_type, expected_in_output):
     """Tests exceptions when check object is initialized."""
     with pytest.raises(exception_type) as error:
-        CheckType.init(check_type_str)
+        CheckType.create(check_type_str)
     assert expected_in_output in error.value.__str__()
 
 
@@ -123,7 +123,7 @@ def tests_exceptions_init(check_type_str, exception_type, expected_in_output):
 @pytest.mark.parametrize("check_type_str, evaluate_args, folder_name, path, expected_results", check_type_tests)
 def test_check_type_results(check_type_str, evaluate_args, folder_name, path, expected_results):
     """Validate that CheckType.evaluate returns the expected_results."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
     pre_data, post_data = load_mocks(folder_name)
     pre_value = check.get_value(pre_data, path)
     post_value = check.get_value(post_data, path)
@@ -238,7 +238,7 @@ def test_check_type_results(check_type_str, evaluate_args, folder_name, path, ex
 @pytest.mark.parametrize("folder_name, check_type_str, evaluate_args, path, expected_result", check_tests)
 def test_checks(folder_name, check_type_str, evaluate_args, path, expected_result):
     """Validate multiple checks on the same data to catch corner cases."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
     pre_data, post_data = load_mocks(folder_name)
     pre_value = check.get_value(pre_data, path)
     post_value = check.get_value(post_data, path)
@@ -283,7 +283,7 @@ def test_checks(folder_name, check_type_str, evaluate_args, path, expected_resul
 )
 def test_param_match(filename, check_type_str, evaluate_args, path, expected_result):
     """Validate parameter_match check type."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
     # There is not concept of "pre" and "post" in parameter_match.
     data = load_json_file("parameter_match", filename)
     value = check.get_value(data, path)
@@ -330,7 +330,7 @@ def test_param_match(filename, check_type_str, evaluate_args, path, expected_res
 @pytest.mark.parametrize("filename, check_type_str, evaluate_args, path, expected_result", regex_match)
 def test_regex_match(filename, check_type_str, evaluate_args, path, expected_result):
     """Validate regex check type."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
     # There is not concept of "pre" and "post" in parameter_match.
     data = load_json_file("api", filename)
     value = check.get_value(data, path)
diff --git a/tests/test_validates.py b/tests/test_validates.py
index bd7d2db..a5d3c39 100644
--- a/tests/test_validates.py
+++ b/tests/test_validates.py
@@ -1,6 +1,6 @@
 """Unit tests for validator CheckType method."""
 import pytest
-from netcompare.check_types import CheckType
+from jdiff.check_types import CheckType
 
 tolerance_wrong_argumet = (
     "tolerance",
@@ -124,7 +124,7 @@
 @pytest.mark.parametrize("check_type_str, evaluate_args, expected_results", all_tests)
 def test_validate_arguments(check_type_str, evaluate_args, expected_results):
     """Test CheckType validate method for each check-type."""
-    check = CheckType.init(check_type_str)
+    check = CheckType.create(check_type_str)
 
     with pytest.raises(ValueError) as exc_info:
         if check_type_str == "tolerance":