Skip to content

Commit e424b57

Browse files
committed
tests: stop manual request
1 parent c3764cb commit e424b57

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

tests/test_client_application.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,42 +69,6 @@ def testclient(app):
6969
return app.test_client()
7070

7171

72-
def test_manual_requests(iam_server, client, user, testclient):
73-
s = requests.Session()
74-
75-
# attempt to access a protected page
76-
redirect_uri = testclient.get("/login").location
77-
78-
# authorization code request
79-
# 1. login screen
80-
res = s.post(
81-
redirect_uri,
82-
data={
83-
"login": "user",
84-
"password": "password",
85-
},
86-
allow_redirects=False,
87-
)
88-
89-
# 2. consent screen
90-
res = s.post(
91-
redirect_uri,
92-
data={"answer": "accept"},
93-
allow_redirects=False,
94-
)
95-
96-
authorization = iam_server.models.AuthorizationCode.get()
97-
assert authorization.client == client
98-
99-
res = testclient.get(res.headers["Location"])
100-
101-
token = iam_server.models.Token.get()
102-
assert token.client == client
103-
104-
assert res.json["userinfo"]["sub"] == "user"
105-
assert res.json["access_token"] == token.access_token
106-
107-
10872
def test_login_and_consent(iam_server, client, user, testclient):
10973
iam_server.login(user)
11074
iam_server.consent(user)

0 commit comments

Comments
 (0)