示例#1
0
 def test_should_find_correct_sensorname(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose._get_sensorname(), 'cleese')
示例#2
0
 def test_should_find_triptype_high(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.triptype, 'High')
示例#3
0
 def test_event_event_post(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertTrue(goose.post_event())
示例#4
0
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.goosename, self.goosename)
示例#5
0
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.climatevalue, self.temperature)
示例#6
0
 def test_init_should_parse_trap_without_error(self):
     self.assertTrue(wg.WeatherGoose1(self.trap, None, None, None))
示例#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')
示例#8
0
 def test_should_find_correct_sensorname(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose._get_sensorname() == 'cleese'
示例#9
0
 def test_should_find_triptype_high(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.triptype == 'High'
示例#10
0
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.climatevalue == self.temperature
示例#11
0
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.goosename == self.goosename
示例#12
0
 def test_init_should_raise_on_invalid_oid(self):
     trap = Mock(snmpTrapOID='5')
     with pytest.raises(Exception):
         wg.WeatherGoose1(trap, None, None, None)