Ejemplo n.º 1
0
 def test_that_wrong_scene_file_name_causes_validation_error(
         self, scene_file='scene_file.png'):  # pylint: disable=no-self-use
     with pytest.raises(ConcentValidationError) as exception_wrapper:
         validate_scene_file(scene_file)
     assert_that(
         exception_wrapper.value.error_message).contains(f'{scene_file}')
     assert_that(exception_wrapper.value.error_code).is_equal_to(
         ErrorCode.MESSAGE_INVALID)
Ejemplo n.º 2
0
 def test_that_valid_scene_file_name_doesnt_raise_any_error(
         self, scene_file):
     try:
         validate_scene_file(scene_file)
     except Exception as exception:  # pylint: disable=broad-except
         assert False, f"Unexpected exception has been raised: {str(exception)}"