def test_get_queryset(self):
        # Create a fresh user
        user = User.objects.create_user(
            username='hjkdhds@12ioavoi3.local', password='moo')
        user.add_to_group(self.group1.pk)

        # Create a fresh message and flag it
        thread = mommy.make('connectmessages.Thread', group=self.group1)
        message = mommy.make(
            'connectmessages.Message', sender=user, thread=thread)
        mommy.make('connectmessages.Message', sender=user, thread=thread)
        message.flag(flagged_by=self.staff_user)

        # Authenticate the user so they have a visit count
        middleware = list(settings.MIDDLEWARE_CLASSES)
        if ('open_connect.middleware.visit_tracking.VisitTrackingMiddleware'
                not in middleware):
            middleware.insert(
                0,
                'open_connect.middleware.visit_tracking.'
                'VisitTrackingMiddleware'
                )
        with override_settings(MIDDLEWARE_CLASSES=middleware):
            client = Client()
            client.post(
                reverse('login'),
                {'username': 'hjkdhds@12ioavoi3.local', 'password': 'moo'}
            )

        # Get the queryset
        view = UserReportListView()
        view.request = self.request_factory.get('/')
        queryset = view.get_queryset()

        # Make sure everything looks right
        user = queryset.get(pk=user.pk)
        self.assertEqual(user.flags_received, 1)
        self.assertEqual(user.messages_sent, 2)
        self.assertEqual(user.visit_count, 1)
Timer event callback method.  Subclasses can override this method.
dataset/ETHPy150Open ofa/connect/open_connect/reporting/tests/test_views.py/UserReportListViewTest.test_get_queryset--crossover with--dataset/ETHPy150Open RobotLocomotion/director/src/python/director/timercallback.py/TimerCallback.tick