def test_dashboard_ticket_counts(self):
        """
        Check that the regular users' dashboard only shows 1 of the 2 queues,
        that user_1 only sees a total of 1 ticket, that user_2 sees a total of 2
        tickets, but that the superuser's dashboard shows all queues and tickets.
        """

        # Regular users
        for identifier in self.IDENTIFIERS:
            self.client.login(username='User_%d' % identifier, password=identifier)
            response = self.client.get(reverse('helpdesk_dashboard'))
            self.assertEqual(
                len(response.context['unassigned_tickets']),
                identifier,
                'Unassigned tickets were not properly limited by queue membership'
            )
            self.assertEqual(
                len(response.context['dash_tickets']),
                1,
                'The queues in dash_tickets were not properly limited by queue membership'
            )
            self.assertEqual(
                response.context['dash_tickets'][0]['open'],
                identifier * 2,
                'The tickets in dash_tickets were not properly limited by queue membership'
            )
            self.assertEqual(
                response.context['basic_ticket_stats']['open_ticket_stats'][0][1],
                identifier * 2,
                'Basic ticket stats were not properly limited by queue membership'
            )

        # Superuser
        self.client.login(username='superuser', password='superuser')
        response = self.client.get(reverse('helpdesk_dashboard'))
        self.assertEqual(
            len(response.context['unassigned_tickets']),
            3,
            'Unassigned tickets were limited by queue membership for a superuser'
        )
        self.assertEqual(
            len(response.context['dash_tickets']),
            2,
            'The queues in dash_tickets were limited by queue membership for a superuser'
        )
        self.assertEqual(
            response.context['dash_tickets'][0]['open'] +
            response.context['dash_tickets'][1]['open'],
            6,
            'The tickets in dash_tickets were limited by queue membership for a superuser'
        )
        self.assertEqual(
            response.context['basic_ticket_stats']['open_ticket_stats'][0][1] +
            response.context['basic_ticket_stats']['open_ticket_stats'][1][1],
            6,
            'Basic ticket stats were limited by queue membership for a superuser'
        )
dataset/ETHPy150Open rossp/django-helpdesk/helpdesk/tests/test_per_queue_staff_permission.py/PerQueueStaffMembershipTestCase.test_dashboard_ticket_counts/original