def test_token_never_expires_if_token_lifetime_is_none(self):
        user = get_user_model().objects.get(username=self.username)
        user.token_lifetime = None
        user.save()

        response = self.client.post(
            self.auth_url, data={'username': self.username, 'password': self.password}
        )
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        original_token = response.data['token']

        year_ahead = timezone.now() + timezone.timedelta(days=365)
        with freeze_time(year_ahead):
            response = self.client.post(
                self.auth_url,
                data={'username': self.username, 'password': self.password},
            )
            token_in_a_year = response.data['token']
            self.assertEqual(original_token, token_in_a_year)