Ejemplo n.º 1
0
 def test_already_finished(self):
     registry.register(SimpleHandler, ['something'])
     request = toolbox.add_request('abc', file_type='something')
     request.finished_at = timezone.now()
     request.save()
     self.assertFalse(registry.dispatch(request.id))
     self.assertEqual(0, len(SimpleHandler.handled))
Ejemplo n.º 2
0
 def test_already_finished(self):
     registry.register(SimpleHandler, ['something'])
     request = toolbox.add_request('abc', file_type='something')
     request.finished_at = timezone.now()
     request.save()
     self.assertFalse(registry.dispatch(request.id))
     self.assertEqual(0, len(SimpleHandler.handled))
Ejemplo n.º 3
0
 def test(self):
     registry.register(SimpleHandler, ['something'])
     request = toolbox.add_request('abc', file_type='something')
     self.assertTrue(registry.dispatch(request.id))
     self.assertEqual([request], SimpleHandler.handled)
Ejemplo n.º 4
0
 def test(self):
     registry.register(SimpleHandler, ['something'])
     request = toolbox.add_request('abc', file_type='something')
     self.assertTrue(registry.dispatch(request.id))
     self.assertEqual([request], SimpleHandler.handled)