Skip to content

Commit eb54015

Browse files
committed
fix(test): request_change_phone_number
This test requires X-LC-Session header.
1 parent d2d2065 commit eb54015

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_user.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,17 @@ def test_request_mobile_phone_verify(): # type: () -> None
276276

277277
@with_setup(get_setup_func())
278278
def test_request_change_phone_number(): # type: () -> None
279+
user1 = User()
280+
user1.set("username", "user1_name")
281+
user1.set("password", "password")
282+
user1.login()
279283
try:
280284
User.request_change_phone_number("18611111112")
281285
except LeanCloudError as e:
282-
if e.code not in (213, 601):
286+
if e.code not in (119, 213, 601):
283287
raise e
288+
finally:
289+
user1.logout()
284290

285291

286292
@with_setup(get_setup_func())

0 commit comments

Comments
 (0)