def METHOD_NAME(self):
    User = get_user_model()
    user = User.objects.create()
    call_command(
        "createapplication",
        "confidential",
        "authorization-code",
        "--redirect-uris=http://example.com http://example2.com",
        "--user=%s" % user.pk,
    )
    app = Application.objects.get()
    self.assertEqual(app.user, user)