@@ -1118,11 +1118,12 @@ def test_bulk_migrate_create_collections(self):
11181118 """
11191119 source = ModulestoreSource .objects .create (key = self .legacy_library .location .library_key )
11201120 source_2 = ModulestoreSource .objects .create (key = self .legacy_library_2 .location .library_key )
1121+ source_3 = ModulestoreSource .objects .create (key = self .course .id )
11211122
11221123 task = bulk_migrate_from_modulestore .apply_async (
11231124 kwargs = {
11241125 "user_id" : self .user .id ,
1125- "sources_pks" : [source .id , source_2 .id ],
1126+ "sources_pks" : [source .id , source_2 .id , source_3 . id ],
11261127 "target_library_key" : str (self .lib_key ),
11271128 "target_collection_pks" : [],
11281129 "create_collections" : True ,
@@ -1142,13 +1143,32 @@ def test_bulk_migrate_create_collections(self):
11421143 self .assertEqual (migration .composition_level , CompositionLevel .Unit .value )
11431144 self .assertEqual (migration .repeat_handling_strategy , RepeatHandlingStrategy .Skip .value )
11441145 self .assertEqual (migration .target_collection .title , self .legacy_library .display_name )
1146+ self .assertIn (
1147+ "This collection contains content migrated from a legacy library on:" ,
1148+ migration .target_collection .description ,
1149+ )
11451150
11461151 migration_2 = ModulestoreMigration .objects .get (
11471152 source = source_2 , target = self .learning_package
11481153 )
11491154 self .assertEqual (migration_2 .composition_level , CompositionLevel .Unit .value )
11501155 self .assertEqual (migration_2 .repeat_handling_strategy , RepeatHandlingStrategy .Skip .value )
11511156 self .assertEqual (migration_2 .target_collection .title , self .legacy_library_2 .display_name )
1157+ self .assertIn (
1158+ "This collection contains content migrated from a legacy library on:" ,
1159+ migration_2 .target_collection .description ,
1160+ )
1161+
1162+ migration_3 = ModulestoreMigration .objects .get (
1163+ source = source_3 , target = self .learning_package
1164+ )
1165+ self .assertEqual (migration_3 .composition_level , CompositionLevel .Unit .value )
1166+ self .assertEqual (migration_3 .repeat_handling_strategy , RepeatHandlingStrategy .Skip .value )
1167+ self .assertEqual (migration_3 .target_collection .title , self .course .display_name )
1168+ self .assertIn (
1169+ f"This collection contains content imported from the course { self .course .display_name } on:" ,
1170+ migration_3 .target_collection .description ,
1171+ )
11521172
11531173 @ddt .data (
11541174 RepeatHandlingStrategy .Skip ,
0 commit comments