@@ -181,15 +181,15 @@ def test_categories__none_provided(self):
181181 mapper = ChannelMapper (self .channel )
182182 mapper .run ()
183183
184- self .assertEqual (mapper .mapped_channel .categories , {} )
184+ self .assertEqual (mapper .mapped_channel .categories , [] )
185185
186186 def test_categories__only_provided (self ):
187187 with using_content_database (self .tempdb ):
188188 kolibri_content_models .ContentNode .objects .filter (
189189 channel_id = self .channel .id ,
190190 ).update (categories = None )
191191
192- categories = { "Category1" : True , "Category2" : True }
192+ categories = [ "Category1" , "Category2" ]
193193 mapper = ChannelMapper (self .channel , categories = categories )
194194 mapper .run ()
195195
@@ -216,7 +216,7 @@ def test_categories__only_on_content_nodes(self):
216216
217217 self .assertEqual (
218218 mapper .mapped_channel .categories ,
219- { "Category1" : True , "Category2" : True , "Category3" : True } ,
219+ [ "Category1" , "Category2" , "Category3" ] ,
220220 )
221221
222222 def test_categories__both_provided_and_on_content_nodes (self ):
@@ -235,18 +235,13 @@ def test_categories__both_provided_and_on_content_nodes(self):
235235 contentnode1 .save ()
236236 contentnode2 .save ()
237237
238- categories = { "Category3" : True , "Category4" : True }
238+ categories = [ "Category3" , "Category4" ]
239239 mapper = ChannelMapper (self .channel , categories = categories )
240240 mapper .run ()
241241
242242 self .assertEqual (
243243 mapper .mapped_channel .categories ,
244- {
245- "Category1" : True ,
246- "Category2" : True ,
247- "Category3" : True ,
248- "Category4" : True ,
249- },
244+ ["Category1" , "Category2" , "Category3" , "Category4" ],
250245 )
251246
252247 def test_countries__none_provided (self ):
0 commit comments