def tearDown(self): for model in self.actstream_models: model = get_model(*model.split('.')) unregister(model) model.objects.all().delete() Action.objects.all().delete() Follow.objects.all().delete() self.User.objects.all().delete()
def test_registration(self): instance = Unregistered.objects.create(name='fubar') self.assertRaises(ImproperlyConfigured, actor_stream, instance) register(Unregistered) self.assertEqual(actor_stream(instance).count(), 0) self.assertRaises(RuntimeError, model_stream, Abstract) self.assertRaises(ImproperlyConfigured, register, Abstract) unregister(Unregistered)
def tearDown(self): for model in self.actstream_models: unregister(model)