Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Feb 20, 2024
1 parent e6a0dce commit aa38f08
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand All @@ -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={
Expand All @@ -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={},
Expand All @@ -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={
Expand Down
32 changes: 16 additions & 16 deletions openedx/core/djangoapps/content_tagging/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
},
Expand Down Expand Up @@ -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
Expand Down
Empty file added uwsgi.ini
Empty file.

0 comments on commit aa38f08

Please sign in to comment.