Skip to content

Commit

Permalink
fix: remove disable codes
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfelipec95 committed Jan 2, 2024
1 parent 87c3314 commit 3e50f26
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion eox_tagging/test/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,24 @@ def test_bad_field_config(self):
@override_settings(EOX_TAGGING_DEFINITIONS=[])
def test_empty_setting(self):
"""
Used to test saving without validisable = C0103, R0903, R0904, W0511, R0901lue": {"in": ["free", "private"]},
Used to test saving without validations defined.
If the definitions array is empty then the tag cannot be created.
"""
with self.assertRaises(ValidationError):
Tag.objects.create_tag(
tag_value="example_tag_value",
tag_type="example_tag_1",
target_object=self.target_object,
owner_object=self.owner_object,
access=AccessLevel.PRIVATE,
)

@override_settings(
EOX_TAGGING_DEFINITIONS=[
{
"tag_type": "subscription_tier",
"force_access": "private",
"validate_tag_value": {"in": ["free", "private"]},
"validate_owner_object": "User",
"validate_target_object": "User",
},
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ignore = migrations,CVS
max-line-length = 120

[pylint.messages_control]
disable = raise-missing-from, fixme, too-many-public-methods
disable = raise-missing-from, fixme, too-many-public-methods, too-few-public-methods

[MESSAGES CONTROL]
enable =
Expand Down

0 comments on commit 3e50f26

Please sign in to comment.