Skip to content

Commit

Permalink
test: remove unnecessary use of searchable_doc_collections func
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Dec 12, 2024
1 parent 2e3cccd commit 1386b78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 8 additions & 0 deletions openedx/core/djangoapps/content/search/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def setUp(self):
"last_published": None,
"created": created_date.timestamp(),
"modified": modified_date.timestamp(),
"collections": {
"display_name": [],
"key": [],
}
}
self.doc_problem2 = {
"id": "lborg1libproblemp2-b2f65e29",
Expand All @@ -164,6 +168,10 @@ def setUp(self):
"last_published": None,
"created": created_date.timestamp(),
"modified": created_date.timestamp(),
"collections": {
"display_name": [],
"key": [],
}
}

# Create a couple of taxonomies with tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
searchable_doc_for_course_block,
searchable_doc_tags,
searchable_doc_tags_for_collection,
searchable_doc_collections,
searchable_doc_for_collection,
searchable_doc_for_library_block,
)
Expand Down Expand Up @@ -268,7 +267,6 @@ def test_html_library_block(self):
doc = {}
doc.update(searchable_doc_for_library_block(self.library_block))
doc.update(searchable_doc_tags(self.library_block.usage_key))
doc.update(searchable_doc_collections(self.library_block.usage_key))
assert doc == {
"id": "lbedx2012_fallhtmltext2-4bb47d67",
"type": "library_block",
Expand Down Expand Up @@ -305,7 +303,6 @@ def test_html_published_library_block(self):

doc = searchable_doc_for_library_block(self.library_block)
doc.update(searchable_doc_tags(self.library_block.usage_key))
doc.update(searchable_doc_collections(self.library_block.usage_key))

assert doc == {
"id": "lbedx2012_fallhtmltext2-4bb47d67",
Expand Down Expand Up @@ -345,7 +342,6 @@ def test_html_published_library_block(self):

doc = searchable_doc_for_library_block(self.library_block)
doc.update(searchable_doc_tags(self.library_block.usage_key))
doc.update(searchable_doc_collections(self.library_block.usage_key))

assert doc == {
"id": "lbedx2012_fallhtmltext2-4bb47d67",
Expand Down Expand Up @@ -384,7 +380,6 @@ def test_html_published_library_block(self):
library_api.publish_changes(self.library.key)
doc = searchable_doc_for_library_block(self.library_block)
doc.update(searchable_doc_tags(self.library_block.usage_key))
doc.update(searchable_doc_collections(self.library_block.usage_key))

assert doc == {
"id": "lbedx2012_fallhtmltext2-4bb47d67",
Expand Down

0 comments on commit 1386b78

Please sign in to comment.