@@ -145,7 +145,7 @@ def test_auto_check_creation(self):
145145 def test_device_deleted (self ):
146146 self .assertEqual (Check .objects .count (), 0 )
147147 d = self ._create_device (organization = self ._create_org ())
148- self .assertEqual (Check .objects .count (), 2 )
148+ self .assertEqual (Check .objects .count (), 3 )
149149 d .delete ()
150150 self .assertEqual (Check .objects .count (), 0 )
151151
@@ -156,7 +156,7 @@ def test_config_modified_device_problem(self):
156156 self ._create_config (status = 'modified' , organization = self ._create_org ())
157157 d = Device .objects .first ()
158158 d .monitoring .update_status ('ok' )
159- self .assertEqual (Check .objects .count (), 2 )
159+ self .assertEqual (Check .objects .count (), 3 )
160160 self .assertEqual (Metric .objects .count (), 0 )
161161 self .assertEqual (AlertSettings .objects .count (), 0 )
162162 check = Check .objects .filter (check_type = self ._CONFIG_APPLIED ).first ()
@@ -186,7 +186,7 @@ def test_config_error(self):
186186 self ._create_config (status = 'error' , organization = self ._create_org ())
187187 dm = Device .objects .first ().monitoring
188188 dm .update_status ('ok' )
189- self .assertEqual (Check .objects .count (), 2 )
189+ self .assertEqual (Check .objects .count (), 3 )
190190 self .assertEqual (Metric .objects .count (), 0 )
191191 self .assertEqual (AlertSettings .objects .count (), 0 )
192192 check = Check .objects .filter (check_type = self ._CONFIG_APPLIED ).first ()
@@ -219,7 +219,7 @@ def test_config_error(self):
219219 @patch ('openwisp_monitoring.check.settings.AUTO_PING' , False )
220220 def test_config_check_critical_metric (self ):
221221 self ._create_config (status = 'modified' , organization = self ._create_org ())
222- self .assertEqual (Check .objects .count (), 2 )
222+ self .assertEqual (Check .objects .count (), 3 )
223223 d = Device .objects .first ()
224224 dm = d .monitoring
225225 dm .update_status ('ok' )
@@ -238,7 +238,7 @@ def test_config_check_critical_metric(self):
238238
239239 def test_no_duplicate_check_created (self ):
240240 self ._create_config (organization = self ._create_org ())
241- self .assertEqual (Check .objects .count (), 2 )
241+ self .assertEqual (Check .objects .count (), 3 )
242242 d = Device .objects .first ()
243243 auto_create_config_check .delay (
244244 model = Device .__name__ .lower (),
@@ -261,7 +261,7 @@ def test_device_unreachable_no_config_check(self):
261261 self ._create_config (status = 'modified' , organization = self ._create_org ())
262262 d = self .device_model .objects .first ()
263263 d .monitoring .update_status ('critical' )
264- self .assertEqual (Check .objects .count (), 2 )
264+ self .assertEqual (Check .objects .count (), 3 )
265265 c2 = Check .objects .filter (check_type = self ._CONFIG_APPLIED ).first ()
266266 c2 .perform_check ()
267267 self .assertEqual (Metric .objects .count (), 0 )
@@ -272,7 +272,7 @@ def test_device_unknown_no_config_check(self):
272272 self ._create_config (status = 'modified' , organization = self ._create_org ())
273273 d = self .device_model .objects .first ()
274274 d .monitoring .update_status ('unknown' )
275- self .assertEqual (Check .objects .count (), 2 )
275+ self .assertEqual (Check .objects .count (), 3 )
276276 c2 = Check .objects .filter (check_type = self ._CONFIG_APPLIED ).first ()
277277 c2 .perform_check ()
278278 self .assertEqual (Metric .objects .count (), 0 )
0 commit comments