Skip to content

Commit

Permalink
test: ✅ Update patch paths to ensure settings are in place for tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrew82 committed Oct 17, 2023
1 parent ae11d00 commit 7371270
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions nautobot_ssot/tests/device42/unit/test_device42_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ def setUp(self):
self.master_dev.os_version = ""

@patch(
"nautobot_ssot.integrations.device42.diffsync.adapters.device42.PLUGIN_CFG",
{"device42_customer_is_facility": True, "device42_hostname_mapping": [{"AUS": "Austin"}]},
"nautobot_ssot.integrations.device42.utils.device42.PLUGIN_CFG",
{
"device42_customer_is_facility": True,
"device42_facility_prepend": "sitecode-",
"device42_hostname_mapping": [{"AUS": "Austin"}],
},
)
def test_data_loading(self):
"""Test the load() function."""
Expand Down
4 changes: 2 additions & 2 deletions nautobot_ssot/tests/device42/unit/test_utils_device42.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_get_netmiko_platform(self, name, sent, received): # pylint: disable=un
self.assertEqual(device42.get_netmiko_platform(sent), received)

@patch(
"nautobot_ssot.integrations.device42.diffsync.adapters.device42.PLUGIN_CFG",
"nautobot_ssot.integrations.device42.utils.device42.PLUGIN_CFG",
{"device42_role_prepend": "nautobot-"},
)
def test_find_device_role_from_tags(self):
Expand All @@ -189,7 +189,7 @@ def test_find_device_role_from_tags(self):
self.assertEqual(device42.find_device_role_from_tags(tag_list=tags_missing_role), "Unknown")

@patch(
"nautobot_ssot.integrations.device42.diffsync.adapters.device42.PLUGIN_CFG",
"nautobot_ssot.integrations.device42.utils.device42.PLUGIN_CFG",
{"device42_facility_prepend": "sitecode-"},
)
def test_get_facility(self):
Expand Down

0 comments on commit 7371270

Please sign in to comment.