Skip to content

Commit

Permalink
Load plugins in validation/subfields tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 14, 2024
1 parent 604fb67 commit 65ae24d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ckanext/scheming/tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
not_empty = get_validator("not_empty")


pytestmark = [
pytest.mark.usefixtures("with_plugins"),
pytest.mark.ckan_config(
"ckan.plugins",
" ".join([
"scheming_datasets",
"scheming_groups",
"scheming_organizations",
"scheming_test_plugin",
"scheming_subfields_index",
"scheming_test_validation",
])
)
]


class TestGetValidatorOrConverter(object):
def test_missing(self):
with pytest.raises(SchemingException):
Expand Down Expand Up @@ -941,8 +957,6 @@ def test_invalid_choice(self):
raise AssertionError("ValidationError not raised")


@pytest.mark.ckan_config("ckan.plugins", "scheming_test_validation")
@pytest.mark.usefixtures("with_plugins")
class TestValidatorsFromString:
def test_empty(self):
assert validators_from_string("", {}, {}) == []
Expand Down

0 comments on commit 65ae24d

Please sign in to comment.