def METHOD_NAME(self):
    """Test token creation endpoint"""
    self.user.attributes[USER_ATTRIBUTE_TOKEN_EXPIRING] = False
    self.user.save()
    response = self.client.post(
        reverse("authentik_api:token-list"), {"identifier": "test-token"}
    )
    self.assertEqual(response.status_code, 201)
    token = Token.objects.get(identifier="test-token")
    self.assertEqual(token.user, self.user)
    self.assertEqual(token.intent, TokenIntents.INTENT_API)
    self.assertEqual(token.expiring, False)