Skip to content

Commit

Permalink
Remove already present snmpsim fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Aug 23, 2023
1 parent 258ae3c commit 05445a8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/tasks/test_juniperalarmtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

class TestJuniperalarmTask:
@pytest.mark.asyncio
async def test_task_runs_without_errors(self, snmpsim, juniper_alarm_task):
async def test_task_runs_without_errors(self, juniper_alarm_task):
assert (await juniper_alarm_task.run()) is None

@pytest.mark.asyncio
async def test_task_does_nothing_for_non_juniper_device(self, snmpsim, juniper_alarm_task):
async def test_task_does_nothing_for_non_juniper_device(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 11
Expand All @@ -22,7 +22,7 @@ async def test_task_does_nothing_for_non_juniper_device(self, snmpsim, juniper_a
assert device_state.alarms is None

@pytest.mark.asyncio
async def test_task_does_nothing_for_non_int_result(self, snmpsim, snmp_test_port):
async def test_task_does_nothing_for_non_int_result(self, snmp_test_port):
device = PollDevice(
name="buick.lab.example.org",
address="127.0.0.1",
Expand All @@ -38,7 +38,7 @@ async def test_task_does_nothing_for_non_int_result(self, snmpsim, snmp_test_por
assert device_state.alarms is None

@pytest.mark.asyncio
async def test_task_saves_alarm_count_in_device_state(self, snmpsim, juniper_alarm_task):
async def test_task_saves_alarm_count_in_device_state(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -50,7 +50,7 @@ async def test_task_saves_alarm_count_in_device_state(self, snmpsim, juniper_ala
assert device_state.alarms["red"] == 2

@pytest.mark.asyncio
async def test_task_overrides_alarm_count_in_device_state(self, snmpsim, juniper_alarm_task):
async def test_task_overrides_alarm_count_in_device_state(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -65,7 +65,7 @@ async def test_task_overrides_alarm_count_in_device_state(self, snmpsim, juniper
assert device_state.alarms["red"] == 2

@pytest.mark.asyncio
async def test_task_creates_both_alarm_events_on_both_counts_changed(self, snmpsim, juniper_alarm_task):
async def test_task_creates_both_alarm_events_on_both_counts_changed(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -81,7 +81,7 @@ async def test_task_creates_both_alarm_events_on_both_counts_changed(self, snmps
assert red_event.alarm_count == 2

@pytest.mark.asyncio
async def test_task_creates_one_alarm_event_on_one_count_changed(self, snmpsim, juniper_alarm_task):
async def test_task_creates_one_alarm_event_on_one_count_changed(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -100,7 +100,7 @@ async def test_task_creates_one_alarm_event_on_one_count_changed(self, snmpsim,
assert red_event.alarm_count == 2

@pytest.mark.asyncio
async def test_task_updates_alarm_events(self, snmpsim, juniper_alarm_task):
async def test_task_updates_alarm_events(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -119,7 +119,7 @@ async def test_task_updates_alarm_events(self, snmpsim, juniper_alarm_task):
assert red_event.alarm_count == 2

@pytest.mark.asyncio
async def test_task_does_not_create_alarm_events_on_unchanged_alarm_count(self, snmpsim, juniper_alarm_task):
async def test_task_does_not_create_alarm_events_on_unchanged_alarm_count(self, juniper_alarm_task):
task = juniper_alarm_task
device_state = task.state.devices.get(device_name=task.device.name)
device_state.enterprise_id = 2636
Expand All @@ -137,7 +137,7 @@ async def test_task_does_not_create_alarm_events_on_unchanged_alarm_count(self,
assert not red_event

@pytest.mark.asyncio
async def test_task_does_not_create_alarm_events_on_alarm_count_zero_on_first_run(self, snmpsim, snmp_test_port):
async def test_task_does_not_create_alarm_events_on_alarm_count_zero_on_first_run(self, snmp_test_port):
device = PollDevice(
name="buick.lab.example.org",
address="127.0.0.1",
Expand Down

0 comments on commit 05445a8

Please sign in to comment.