projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update requirements-dev.in to follow branch v12.0 instead of master
[osm/MON.git]
/
osm_mon
/
tests
/
unit
/
evaluator
/
test_evaluator.py
diff --git
a/osm_mon/tests/unit/evaluator/test_evaluator.py
b/osm_mon/tests/unit/evaluator/test_evaluator.py
index
b20f602
..
ce72d09
100644
(file)
--- a/
osm_mon/tests/unit/evaluator/test_evaluator.py
+++ b/
osm_mon/tests/unit/evaluator/test_evaluator.py
@@
-36,17
+36,18
@@
class EvaluatorTest(TestCase):
super().setUp()
self.config = Config()
super().setUp()
self.config = Config()
- @mock.patch(
'multiprocessing.Process'
)
+ @mock.patch(
"multiprocessing.Process"
)
@mock.patch.object(Evaluator, "notify_alarm")
@mock.patch.object(EvaluatorService, "evaluate_alarms")
@mock.patch.object(Evaluator, "notify_alarm")
@mock.patch.object(EvaluatorService, "evaluate_alarms")
- @mock.patch('osm_mon.core.database.db')
- def test_evaluate(self, db, evaluate_alarms, notify_alarm, process):
+ def test_evaluate(self, evaluate_alarms, notify_alarm, process):
mock_alarm = mock.Mock()
mock_alarm = mock.Mock()
- mock_alarm.operation =
'gt'
+ mock_alarm.operation =
"gt"
mock_alarm.threshold = 50.0
evaluate_alarms.return_value = [(mock_alarm, AlarmStatus.ALARM)]
evaluator = Evaluator(self.config)
evaluator.evaluate()
mock_alarm.threshold = 50.0
evaluate_alarms.return_value = [(mock_alarm, AlarmStatus.ALARM)]
evaluator = Evaluator(self.config)
evaluator.evaluate()
- process.assert_called_with(target=notify_alarm, args=(mock_alarm, AlarmStatus.ALARM))
+ process.assert_called_with(
+ target=notify_alarm, args=(mock_alarm, AlarmStatus.ALARM)
+ )