Skip to content

Commit

Permalink
MAINT: Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
khalford committed Oct 30, 2023
1 parent 3c58d50 commit 454388d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion pynetbox_data_uploader/lib/netbox_api/netbox_get_id.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from operator import attrgetter
from typing import Union, Dict
from lib.enums.dcim_device_id import DeviceInfoID
from lib.enums.dcim_device_no_id import DeviceInfoNoID

# pylint:disable = too-few-public-methods

Expand Down
6 changes: 6 additions & 0 deletions pynetbox_data_uploader/tests/test_netbox_get_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def instance_fixture():


def test_get_id_from_key_with_id_enums(instance):
"""
This test ensures that the get_id method is called for all properties in the DeviceInfoID enum.
"""
with patch("lib.netbox_api.netbox_get_id.NetboxGetID.get_id") as mock_get_id:
for member in [prop.name for prop in DeviceInfoID]:
mock_dictionary = {member: "abc",
Expand All @@ -26,6 +29,9 @@ def test_get_id_from_key_with_id_enums(instance):


def test_get_id_from_key_with_no_id_enums(instance):
"""
This test ensures that the get_id method is not called for all properties in the DeviceInfoNoID enum.
"""
with patch("lib.netbox_api.netbox_get_id.NetboxGetID.get_id") as mock_get_id:
for member in [prop.name for prop in DeviceInfoNoID]:
mock_dictionary = {member: "abc",
Expand Down

0 comments on commit 454388d

Please sign in to comment.