Example #1
0
 def test_should_find_correct_sensorname(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose._get_sensorname(), 'cleese')
Example #2
0
 def test_should_find_triptype_high(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.triptype, 'High')
Example #3
0
 def test_event_event_post(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertTrue(goose.post_event())
Example #4
0
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.goosename, self.goosename)
Example #5
0
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     self.assertEquals(goose.climatevalue, self.temperature)
Example #6
0
 def test_init_should_parse_trap_without_error(self):
     self.assertTrue(wg.WeatherGoose1(self.trap, None, None, None))
Example #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'
Example #10
0
 def test_should_find_climate_values(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.climatevalue == self.temperature
Example #11
0
 def test_should_find_correct_goosename(self):
     goose = wg.WeatherGoose1(self.trap, None, None, None)
     assert goose.goosename == self.goosename
Example #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)