def setUp(self):
        self.no_of_users = 10

        # Create recipients
        users = []
        for i in range(self.no_of_users):
            u = User(username=i % 'user-%r', email='user%r@test.com' % i)
            u.set_password('pwd@user')
            users.append(u)
        User.objects.bulk_create(users)

        # Create actor
        actor = User.objects.create(username='actor',
                                    email='actor@test.com')
        actor.set_password('pwd@actor')
        actor.save()
        self.actor = User.objects.get(username="actor")

        self.recipient = User.objects.get(username='user-0')

        self.recipient_list = User.objects.filter(
            username__startswith='u').order_by('id')

        # Send notifications to all recipients.
        notify.send(User, recipient_list=list(self.recipient_list),
                    actor=self.actor, verb='wrote a new blog post.')

        # Send some more notifications to a specific user.
        self.recipient_nf_count = 11
        for i in range(10):
            notify.send(User, recipient=self.recipient, actor_text='You',
                        verb='reached level %r' % i)

        # Login this recipient
        self.assertTrue(self.client.login(username="user-0",
                                          password="pwd@user"))
dataset/ETHPy150Open v1k45/django-notify-x/notify/tests/tests.py/NotificationViewTest.setUp/swapped operands of `%`