Example #1
0
 def test_resource_class_error(self):
     with pytest.raises(InvalidConfigError) as excinfo:
         target_factory.make_resource(None, 'UnknownResource', None, {})
     assert "unknown resource class" in excinfo.value.msg
Example #2
0
 def test_resource_param_error(self):
     with pytest.raises(InvalidConfigError) as excinfo:
         target_factory.make_resource(None, 'NetworkSerialPort', 'serial',
                                      {'port': None})
     assert "failed to create" in excinfo.value.msg