diff --git a/tests/openedx_tagging/core/tagging/test_views.py b/tests/openedx_tagging/core/tagging/test_views.py index 379f5855..95a48fc5 100644 --- a/tests/openedx_tagging/core/tagging/test_views.py +++ b/tests/openedx_tagging/core/tagging/test_views.py @@ -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() @@ -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