Exemplo n.º 1
0
 def test_valid_data(self):
     """
     Test HardwareCheck creation with valid data
     """
     hw = HardwareCheck(name='hw', data=self.valid_data)
     hw.validate()
     assert hw.data == self.valid_data
Exemplo n.º 2
0
 def _test_create_hw_invalid(self, data, missing_key):
     with pytest.raises(
             ValueError,
             message=
             'template should fail to instantiate if data dict is missing the %s'
             % missing_key):
         hw = HardwareCheck(name='hw', data=data)
         hw.validate()