Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 2598fe2

Browse files
committed
Add opid to mock Live response page
1 parent 54fc6a4 commit 2598fe2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/client.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,18 @@ def registerMocks(regTokenRedirect=False, guest=False):
5555
("Set-Cookie", "MSPOK=MSPOK"))), content_type="text/html",
5656
body="""<html><body><input name="PPFT" value="ppftvalue"></body></html>""")
5757
# Live login: submit username/password to form.
58+
liveBody = """<html>
59+
<body>
60+
<!-- Stage 1: opid -->
61+
<script type="text/javascript">
62+
f({urlPost:'https://login.live.com/ppsecure/post.srf?wa=wsignin1.0&opid=66AE4377820CC67F'});
63+
</script>
64+
<!-- Stage 2: t -->
65+
<input id="t" value="tvalue">
66+
</body>
67+
</html>"""
5868
responses.add(responses.POST, "{0}/ppsecure/post.srf".format(SkypeConnection.API_MSACC),
59-
status=200, content_type="text/html",
60-
body="""<html><body><input id="t" value="tvalue"></body></html>""")
69+
status=200, content_type="text/html", body=liveBody)
6170
responses.add(responses.POST, "{0}/microsoft".format(SkypeConnection.API_LOGIN),
6271
status=200, content_type="text/html",
6372
body="""<html><body><input name="skypetoken" value="{0}">

0 commit comments

Comments
 (0)