-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Authing/feature/new_login_methods
Feature/new login methods
- Loading branch information
Showing
3 changed files
with
108 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,10 @@ | |
|
||
test_name = '' | ||
|
||
username = "" | ||
password = "" | ||
phone = "" | ||
email = "[email protected]" | ||
username = "dboehfoikjd" | ||
password = "123456" | ||
phone = "17670416754" | ||
phoneCode = 1234 | ||
|
||
|
||
|
@@ -35,6 +36,14 @@ def log_test_result(result): | |
}) | ||
log_test_result(authing.accessToken) | ||
|
||
# ------- login test ---------- # | ||
log_tester_name("使用邮箱密码登陆") | ||
loginResult = authing.login( | ||
email=email, | ||
password=password | ||
) | ||
log_test_result(loginResult) | ||
|
||
# ------- login test ---------- # | ||
log_tester_name("使用用户名密码登陆") | ||
loginResult = authing.login( | ||
|
@@ -43,9 +52,14 @@ def log_test_result(result): | |
) | ||
log_test_result(loginResult) | ||
|
||
# ------- sms test ---------- # | ||
log_tester_name("发送验证码") | ||
verificationResult = authing.getVerificationCode(phone) | ||
log_test_result(verificationResult) | ||
|
||
# ------- login test ---------- # | ||
log_tester_name("使用手机号登陆") | ||
loginResult = authing.login( | ||
loginResult = authing.loginByPhoneCode( | ||
phone=phone, | ||
phoneCode=phoneCode | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters