fix: ruff findings
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
Spec: §8.4, §8.5, §8.6, §8.7
|
||||
"""
|
||||
import json
|
||||
import sqlite3
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch, MagicMock
|
||||
@@ -56,7 +55,7 @@ class TestEnableIdempotentMatrix:
|
||||
"""A fresh package install has a store directory but no database yet."""
|
||||
args = MagicMock(now=False, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.enable_timer") as mock_enable:
|
||||
with patch("fenris.monitor.enable_timer"):
|
||||
cmd_enable(args)
|
||||
|
||||
conn = init_store(store_path)
|
||||
@@ -73,7 +72,7 @@ class TestEnableIdempotentMatrix:
|
||||
|
||||
args = MagicMock(now=False, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.enable_timer") as mock_enable:
|
||||
with patch("fenris.monitor.enable_timer"):
|
||||
cmd_enable(args)
|
||||
|
||||
# Period should be open
|
||||
@@ -98,7 +97,7 @@ class TestEnableIdempotentMatrix:
|
||||
|
||||
args = MagicMock(now=True, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.enable_timer") as mock_enable:
|
||||
with patch("fenris.monitor.enable_timer"):
|
||||
cmd_enable(args)
|
||||
|
||||
# Should still have exactly one open period
|
||||
@@ -122,7 +121,7 @@ class TestEnableIdempotentMatrix:
|
||||
|
||||
args = MagicMock(now=True, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.enable_timer") as mock_enable:
|
||||
with patch("fenris.monitor.enable_timer"):
|
||||
cmd_enable(args)
|
||||
|
||||
# Should have a new open period
|
||||
@@ -151,7 +150,7 @@ class TestDisableIdempotentMatrix:
|
||||
|
||||
args = MagicMock(now=True, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.disable_timer") as mock_disable:
|
||||
with patch("fenris.monitor.disable_timer"):
|
||||
cmd_disable(args)
|
||||
|
||||
# Period should be closed with user_disabled
|
||||
@@ -169,7 +168,7 @@ class TestDisableIdempotentMatrix:
|
||||
|
||||
args = MagicMock(now=True, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.disable_timer") as mock_disable:
|
||||
with patch("fenris.monitor.disable_timer"):
|
||||
cmd_disable(args)
|
||||
|
||||
# No periods should exist
|
||||
|
||||
Reference in New Issue
Block a user