def test_get_filtered_threads_admins_can_access(self):
        self.site_2 = Site.objects.create()
        t1 = Thread.objects.create(site=self.site, url='test_url')
        t2 = Thread.objects.create(site=self.site_2, url='test_url_2')
        self.client.login(email="donald@duck.com", password="password")

        self.admin.is_superuser = False
        self.admin.save()
        self.assertFalse(self.admin.get_threads())

        self.site.admins.add(self.admin)
        num_of_threads = self.admin.get_threads().count()
        self.assertEqual(num_of_threads, 1)
        self.assertEqual(
            self.admin.get_threads()[num_of_threads - 1].id, t1.id)

        self.site_2.admins.add(self.admin)
        self.site.admins.add(self.admin)
        num_of_threads = self.admin.get_threads().count()
        self.assertEqual(num_of_threads, 2)
        self.assertEqual(
            self.admin.get_threads()[num_of_threads - 2].id, t1.id)
        self.assertEqual(
            self.admin.get_threads()[1 - num_of_threads].id, t2.id)
dataset/ETHPy150Open c4all/c4all/admin/tests/thread.py/AdminThreadTestCases.test_get_filtered_threads_admins_can_access/swapped operands of `-`