@@ -47,7 +47,7 @@ def test_resource_validation_wrong_format(self):
47
47
48
48
call_action ("resource_validation_run" , resource_id = resource ["id" ])
49
49
50
- assert "Unsupported resource format" in str (e )
50
+ assert "Unsupported resource format" in str (e . value )
51
51
52
52
def test_resource_validation_no_url_or_upload (self ):
53
53
@@ -57,7 +57,7 @@ def test_resource_validation_no_url_or_upload(self):
57
57
58
58
call_action ("resource_validation_run" , resource_id = resource ["id" ])
59
59
60
- assert "Resource must have a valid URL" in str (e )
60
+ assert "Resource must have a valid URL" in str (e . value )
61
61
62
62
@mock .patch ("ckanext.validation.logic.action.enqueue_job" )
63
63
def test_resource_validation_with_url (self , mock_enqueue_job ):
@@ -529,8 +529,8 @@ def test_validation_fails_on_upload(self):
529
529
)
530
530
531
531
assert "validation" in e .value .error_dict
532
- assert "missing-cell" in str (e )
533
- assert 'Row at position "2" has a missing cell in field "d" at position "4"' in str (e )
532
+ assert "missing-cell" in str (e . value )
533
+ assert 'Row at position "2" has a missing cell in field "d" at position "4"' in str (e . value )
534
534
535
535
@pytest .mark .usefixtures ("mock_uploads" )
536
536
def test_validation_fails_no_validation_object_stored (self ):
@@ -625,8 +625,8 @@ def test_validation_fails_on_upload(self):
625
625
)
626
626
627
627
assert "validation" in e .value .error_dict
628
- assert "missing-cell" in str (e )
629
- assert 'Row at position "2" has a missing cell in field "d" at position "4"' in str (e )
628
+ assert "missing-cell" in str (e . value )
629
+ assert 'Row at position "2" has a missing cell in field "d" at position "4"' in str (e . value )
630
630
631
631
@pytest .mark .usefixtures ("mock_uploads" )
632
632
def test_validation_fails_no_validation_object_stored (self ):
0 commit comments