def process_request(request):
        user = request.user
        if not user.is_authenticated:
            return

        OnlineUserActivity.update_user_activity(user)
Example #2
0
 def test_update_activity_for_user(self):
     self.assertEqual(OnlineUserActivity.objects.all().count(), 2)
     OnlineUserActivity.update_user_activity(self.user1)
     self.assertEqual(OnlineUserActivity.objects.all().count(), 2)