def testLogin(self): print("================") print("log user in") client=Client() username="******" password="******" email="*****@*****.**" response = client.get('/account/login/',{'username': username, 'password': password}) response = loadJson(response.content) print "login success: ", response['success']
def testCreate_Account(self): print("================") print("create user account") client=Client() username="******" password="******" email="*****@*****.**" response = client.post('/account/create/',{'username':username, 'password':password, 'email':email}) response = loadJson(response.content) print "success", response['success']
def testGetUserAll(self): print("================") print("Get user all info") self.testLogin() client=Client() username="******" print username response = client.get('/userprofile/detail/', {'username': username}) response = loadJson(response.content) print "success: ", response['success'] print "message: ", response['message']