Skip to content

Commit

Permalink
test: fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
pomegranited committed Aug 30, 2024
1 parent 8034861 commit 55338e1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions openedx/core/djangoapps/content/search/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,15 @@ def setUp(self):

# Create a collection:
self.learning_package = authoring_api.get_learning_package_by_key(self.library.key)
with freeze_time(created_date):
self.collection = authoring_api.create_collection(
learning_package_id=self.learning_package.id,
title="my_collection",
created_by=None,
description="my collection description"
)
self.collection_dict = {
'id': 1,
'id': self.collection.id,
'type': 'collection',
'display_name': 'my_collection',
'description': 'my collection description',
Expand All @@ -189,13 +196,6 @@ def setUp(self):
"access_id": lib_access.id,
'breadcrumbs': [{'display_name': 'Library'}]
}
with freeze_time(created_date):
self.collection = authoring_api.create_collection(
learning_package_id=self.learning_package.id,
title="my_collection",
created_by=None,
description="my collection description"
)

@override_settings(MEILISEARCH_ENABLED=False)
def test_reindex_meilisearch_disabled(self, mock_meilisearch):
Expand Down

0 comments on commit 55338e1

Please sign in to comment.