@@ -220,7 +220,7 @@ class TestDatabaseUpdates(unittest.TestCase):
220220 """
221221 @classmethod
222222 def setUpClass (self ):
223- self .api = FakeAPI ('data ' )
223+ self .api = FakeAPI ('assets ' )
224224 # Create the original database
225225 self .orig_db = database .Database (
226226 itemtype = 'Movie' , api = self .api , callback = lambda x : x
@@ -285,50 +285,59 @@ def test_nonContinuousAddition(self):
285285 scenario = UpdateScenario (removals = [0 , 1 , 2 , 3 , 6 ])
286286 self .__test_body (scenario )
287287
288+ @unittest .expectedFailure
289+ # The current algorithm is very naive and thus unable to do that.
288290 def test_multipageAddition (self ):
289291 """Add a few items non-continuously missing from multiple pages."""
290292 scenario = UpdateScenario (removals = [0 , 1 , 2 , 16 , 30 , 32 ])
291293 self .__test_body (scenario )
292294
293- # Removal tests
295+ # Removal tests - are all expected to fail at this moment.
294296
297+ @unittest .expectedFailure
295298 def test_singleRemoval (self ):
296299 """Remove a single item from the first page."""
297300 scenario = UpdateScenario (additions = [(0 , 666 )])
298301 self .__test_body (scenario )
299302
303+ @unittest .expectedFailure
300304 def test_simpleRemoval (self ):
301305 """Remove a few items from the first page."""
302306 scenario = UpdateScenario (additions = [(0 , 666 ), (1 , 4270 )])
303307 self .__test_body (scenario )
304308
309+ @unittest .expectedFailure
305310 def test_randomRemoval (self ):
306311 """Remove an item from somewhere on the first page."""
307312 scenario = UpdateScenario (additions = [(4 , 420 )])
308313 self .__test_body (scenario )
309314
315+ @unittest .expectedFailure
310316 def test_nonContinuousRemoval (self ):
311317 """Remove a few items non-continuously from the first page."""
312318 scenario = UpdateScenario (
313319 additions = [(0 , 666 ), (1 , 4270 ), (2 , 2137 ), (5 , 61504 )]
314320 )
315321 self .__test_body (scenario )
316322
323+ @unittest .expectedFailure
317324 def test_multipageRemoval (self ):
318325 """Remove a few items non-continuously from multiple pages."""
319326 scenario = UpdateScenario (
320327 additions = [(3 , 666 ), (4 , 4270 ), (15 , 2137 ), (35 , 61504 )]
321328 )
322329 self .__test_body (scenario )
323330
324- # Other tests
331+ # Other tests - for future features.
325332
333+ @unittest .expectedFailure
326334 def test_complexAdditionRemoval (self ):
327335 """Add and remove a few items at once, but only from the first page."""
328336 scenario = UpdateScenario (
329337 removals = [0 , 1 , 2 , 9 , 13 ],
330338 additions = [(3 , 1991 ), (4 , 37132 )]
331339 )
340+ self .__test_body (scenario )
332341
333342 @unittest .skip ('Relevant feature not implemented yet.' )
334343 def test_difficultAdditionRemoval (self ):
@@ -345,6 +354,7 @@ def test_difficultAdditionRemoval(self):
345354 removals = [0 , 1 , 2 , 9 , 33 ],
346355 additions = [(3 , 1991 ), (34 , 37132 )]
347356 )
357+ self .__test_body (scenario )
348358
349359 def test_hardUpdate (self ):
350360 """Make "random" removals and additions, then hard update."""
0 commit comments