Skip to content

Commit

Permalink
style: fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 19, 2023
1 parent 40602f7 commit f014c9b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/openedx_tagging/core/tagging/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def _object_permission(_user, object_id: str) -> bool:
"""
Everyone have object permission on object_id "abc"
"""
return object_id == "abc" or object_id == "limit_tag_count"
return object_id in ("abc", "limit_tag_count")

super().setUp()

Expand Down Expand Up @@ -461,7 +461,12 @@ def _object_permission(_user, object_id: str) -> bool:
self.dummy_taxonomies = []
for i in range(100):
taxonomy = Taxonomy.objects.create(name=f"Dummy Taxonomy {i}", allow_free_text=True)
ObjectTag.objects.create(object_id="limit_tag_count", taxonomy=taxonomy, _name=taxonomy.name, _value="Dummy Tag")
ObjectTag.objects.create(
object_id="limit_tag_count",
taxonomy=taxonomy,
_name=taxonomy.name,
_value="Dummy Tag"
)
self.dummy_taxonomies.append(taxonomy)

# Override the object permission for the test
Expand Down

0 comments on commit f014c9b

Please sign in to comment.