Beispiel #1
0
 def test_should_find_correct_sensorname(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose._get_sensorname(), 'cleese')
Beispiel #2
0
 def test_should_find_triptype_high(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.triptype, 'High')
Beispiel #3
0
 def test_event_event_post(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertTrue(goose.post_event())
Beispiel #4
0
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.goosename, self.goosename)
Beispiel #5
0
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.climatevalue, self.temperature)
Beispiel #6
0
 def test_init_should_parse_trap_without_error(self):
     self.assertTrue(wg.WeatherGoose1(self.trap, None, None, None))
Beispiel #7
0
 def test_should_find_correct_alert_type(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose._get_alert_type(), 'cmClimateTempCTRAP')
 def test_should_find_correct_sensorname(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose._get_sensorname() == 'cleese'
 def test_should_find_triptype_high(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.triptype == 'High'
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.climatevalue == self.temperature
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.goosename == self.goosename
 def test_init_should_raise_on_invalid_oid(self):
     trap = Mock(snmpTrapOID='5')
     with pytest.raises(Exception):
         wg.WeatherGoose1(trap, None, None, None)