diff --git a/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_objecttag_export_helpers.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_objecttag_export_helpers.py index a784cf4a031d..d5fcea494fba 100644 --- a/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_objecttag_export_helpers.py +++ b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_objecttag_export_helpers.py @@ -164,12 +164,12 @@ def setUp(self): self.library = library_api.create_library( collection.uuid, self.orgA, - f"lib_{self.block_sufix}", + f"lib_{self.block_suffix}", "Test Library", ) self.expected_library_tagged_xblock = TaggedContent( display_name="Test Library", - block_id=f"lib:orgA:lib_{self.block_sufix}", + block_id=f"lib:orgA:lib_{self.block_suffix}", category="library", children=[], object_tags={ @@ -180,11 +180,11 @@ def setUp(self): library_api.create_library_block( self.library.key, "problem", - f"problem1_{self.block_sufix}", + f"problem1_{self.block_suffix}", ) tagged_problem = TaggedContent( display_name="Blank Problem", - block_id=f"lb:orgA:lib_{self.block_sufix}:problem:problem1_{self.block_sufix}", + block_id=f"lb:orgA:lib_{self.block_suffix}:problem:problem1_{self.block_suffix}", category="problem", children=[], object_tags={ @@ -195,11 +195,11 @@ def setUp(self): library_api.create_library_block( self.library.key, "problem", - f"problem2_{self.block_sufix}", + f"problem2_{self.block_suffix}", ) untagged_problem = TaggedContent( display_name="Blank Problem", - block_id=f"lb:orgA:lib_{self.block_sufix}:problem:problem2_{self.block_sufix}", + block_id=f"lb:orgA:lib_{self.block_suffix}:problem:problem2_{self.block_suffix}", category="problem", children=[], object_tags={}, @@ -208,11 +208,11 @@ def setUp(self): library_api.create_library_block( self.library.key, "html", - f"html_{self.block_sufix}", + f"html_{self.block_suffix}", ) tagged_library_html = TaggedContent( display_name="Text", - block_id=f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + block_id=f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", category="html", children=[], object_tags={ diff --git a/openedx/core/djangoapps/content_tagging/tests/test_api.py b/openedx/core/djangoapps/content_tagging/tests/test_api.py index 8acd4c551d14..31e6802393c0 100644 --- a/openedx/core/djangoapps/content_tagging/tests/test_api.py +++ b/openedx/core/djangoapps/content_tagging/tests/test_api.py @@ -344,49 +344,49 @@ def setUp(self): } # Library tags and library contents need a unique block_id that is persisted along test runs - self.block_sufix = str(round(time.time() * 1000)) + self.block_suffix = str(round(time.time() * 1000)) api.tag_object( - object_id=f"lib:orgA:lib_{self.block_sufix}", + object_id=f"lib:orgA:lib_{self.block_suffix}", taxonomy=self.taxonomy_2, tags=['Tag 2.1'], ) - self.library_tags = api.get_object_tags(f"lib:orgA:lib_{self.block_sufix}") + self.library_tags = api.get_object_tags(f"lib:orgA:lib_{self.block_suffix}") api.tag_object( - object_id=f"lb:orgA:lib_{self.block_sufix}:problem:problem1_{self.block_sufix}", + object_id=f"lb:orgA:lib_{self.block_suffix}:problem:problem1_{self.block_suffix}", taxonomy=self.taxonomy_1, tags=['Tag 1.1'], ) self.problem1_tags = api.get_object_tags( - f"lb:orgA:lib_{self.block_sufix}:problem:problem1_{self.block_sufix}" + f"lb:orgA:lib_{self.block_suffix}:problem:problem1_{self.block_suffix}" ) api.tag_object( - object_id=f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + object_id=f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", taxonomy=self.taxonomy_1, tags=['Tag 1.2'], ) self.library_html_tags1 = api.get_object_tags( - object_id=f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + object_id=f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", taxonomy_id=self.taxonomy_1.id, ) api.tag_object( - object_id=f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + object_id=f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", taxonomy=self.taxonomy_2, tags=['Tag 2.2'], ) self.library_html_tags2 = api.get_object_tags( - object_id=f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + object_id=f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", taxonomy_id=self.taxonomy_2.id, ) # Create "deleted" object tags, which will be omitted from the results. for object_id in ( - f"lib:orgA:lib_{self.block_sufix}", - f"lb:orgA:lib_{self.block_sufix}:problem:problem1_{self.block_sufix}", - f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}", + f"lib:orgA:lib_{self.block_suffix}", + f"lb:orgA:lib_{self.block_suffix}:problem:problem1_{self.block_suffix}", + f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}", ): ObjectTag.objects.create( object_id=object_id, @@ -397,13 +397,13 @@ def setUp(self): ) self.expected_library_objecttags = { - f"lib:orgA:lib_{self.block_sufix}": { + f"lib:orgA:lib_{self.block_suffix}": { self.taxonomy_2.id: list(self.library_tags), }, - f"lb:orgA:lib_{self.block_sufix}:problem:problem1_{self.block_sufix}": { + f"lb:orgA:lib_{self.block_suffix}:problem:problem1_{self.block_suffix}": { self.taxonomy_1.id: list(self.problem1_tags), }, - f"lb:orgA:lib_{self.block_sufix}:html:html_{self.block_sufix}": { + f"lb:orgA:lib_{self.block_suffix}:html:html_{self.block_suffix}": { self.taxonomy_1.id: list(self.library_html_tags1), self.taxonomy_2.id: list(self.library_html_tags2), }, @@ -436,7 +436,7 @@ def test_get_library_object_tags(self): """ with self.assertNumQueries(1): object_tags, taxonomies = api.get_all_object_tags( - LibraryLocatorV2.from_string(f"lib:orgA:lib_{self.block_sufix}") + LibraryLocatorV2.from_string(f"lib:orgA:lib_{self.block_suffix}") ) assert object_tags == self.expected_library_objecttags diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100755 index 000000000000..e69de29bb2d1