@@ -194,7 +194,7 @@ def setUp(self) -> None:
194194 with freeze_time (self .created_date ):
195195 self .collection = content_api .create_collection (
196196 learning_package_id = self .learning_package .id ,
197- key = "MYCOL" ,
197+ collection_code = "MYCOL" ,
198198 title = "my_collection" ,
199199 created_by = None ,
200200 description = "my collection description"
@@ -204,7 +204,7 @@ def setUp(self) -> None:
204204 )
205205 self .collection_dict = {
206206 "id" : "lib-collectionorg1libmycol-5b647617" ,
207- "block_id" : self .collection .key ,
207+ "block_id" : self .collection .collection_code ,
208208 "usage_key" : str (self .collection_key ),
209209 "type" : "collection" ,
210210 "display_name" : "my_collection" ,
@@ -711,7 +711,7 @@ def test_index_library_block_and_collections(self, mock_meilisearch) -> None:
711711 for collection in (collection2 , collection1 ):
712712 library_api .update_library_collection_items (
713713 self .library .key ,
714- collection_key = collection .key ,
714+ collection_key = collection .collection_code ,
715715 opaque_keys = [
716716 self .problem1 .usage_key ,
717717 ],
@@ -893,7 +893,7 @@ def test_delete_collection(self, mock_meilisearch) -> None:
893893 with freeze_time (updated_date ):
894894 library_api .update_library_collection_items (
895895 self .library .key ,
896- collection_key = self .collection .key ,
896+ collection_key = self .collection .collection_code ,
897897 opaque_keys = [
898898 self .problem1 .usage_key ,
899899 self .unit .container_key
@@ -907,14 +907,14 @@ def test_delete_collection(self, mock_meilisearch) -> None:
907907 "id" : self .doc_problem1 ["id" ],
908908 "collections" : {
909909 "display_name" : [self .collection .title ],
910- "key" : [self .collection .key ],
910+ "key" : [self .collection .collection_code ],
911911 },
912912 }
913913 doc_unit_with_collection = {
914914 "id" : self .unit_dict ["id" ],
915915 "collections" : {
916916 "display_name" : [self .collection .title ],
917- "key" : [self .collection .key ],
917+ "key" : [self .collection .collection_code ],
918918 },
919919 }
920920
@@ -933,7 +933,7 @@ def test_delete_collection(self, mock_meilisearch) -> None:
933933 # Soft-delete the collection
934934 content_api .delete_collection (
935935 self .collection .learning_package_id ,
936- self .collection .key ,
936+ self .collection .collection_code ,
937937 )
938938
939939 doc_problem_without_collection = {
@@ -968,7 +968,7 @@ def test_delete_collection(self, mock_meilisearch) -> None:
968968 with freeze_time (restored_date ):
969969 content_api .restore_collection (
970970 self .collection .learning_package_id ,
971- self .collection .key ,
971+ self .collection .collection_code ,
972972 )
973973
974974 doc_collection = copy .deepcopy (self .collection_dict )
@@ -990,7 +990,7 @@ def test_delete_collection(self, mock_meilisearch) -> None:
990990 # Hard-delete the collection
991991 content_api .delete_collection (
992992 self .collection .learning_package_id ,
993- self .collection .key ,
993+ self .collection .collection_code ,
994994 hard_delete = True ,
995995 )
996996
0 commit comments