Пример #1
0
    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']
Пример #2
0
    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']
Пример #3
0
    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']