Exemplo n.º 1
0
 def test_watchers(self):
     def check(num):
         assert Collection.objects.get(id=512).subscribers == num
     tasks.collection_watchers(512)
     check(0)
     CollectionWatcher.objects.create(collection_id=512, user=self.user)
     check(1)
Exemplo n.º 2
0
 def test_watchers(self):
     def check(num):
         assert Collection.objects.get(id=512).subscribers == num
     tasks.collection_watchers(512)
     check(0)
     CollectionWatcher.objects.create(collection_id=512, user=self.user)
     check(1)