コード例 #1
0
 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()
コード例 #2
0
 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()
コード例 #3
0
    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)
コード例 #4
0
    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)
コード例 #5
0
 def tearDown(self):
     for model in self.actstream_models:
         unregister(model)