Пример #1
0
class TestRegist(unittest.TestCase):
    def setUp(self):
        self.client = SharkClient('debug') 
    def test_signup(self):
        res0 = self.client.login_sms('18511331131')
        res1 = self.client.query_verify_code('18511331131')
        print res1  
        res2 = self.client.signup_password('18511331131', '123456', res1, '', '') 
        print res2
        #self.assertIsNotNone("{}", 'error')
Пример #2
0
class TestRegist(unittest.TestCase):
    def setUp(self):
        self.client = SharkClient('debug')

    def test_signup(self):
        res0 = self.client.login_sms('18511331131')
        res1 = self.client.query_verify_code('18511331131')
        print res1
        res2 = self.client.signup_password('18511331131', '123456', res1, '',
                                           '')
        print res2
Пример #3
0
class TestLogin(unittest.TestCase):
    def setUp(self):
        self.client = SharkClient('debug')
    def test_login(self):
        url = 'http://dev.shark.kuaikuaiyu.com/api.login?platform=android&version=0,21'
        user_token1 = hashlib.md5()
        user_token1.update(str(time.time()))
        user_token = user_token1.hexdigest()
        res = self.client.login_sms('15011431186')
        verify_code = self.client.query_verify_code('15011431186')
        print verify_code
        print user_token
        data = {
            'mobile':'15011431186',
            'code':verify_code,
            'user_token':user_token,
            'rdid':_DEVICE_ID,
            'bb':_BB,}
        login = requests.post(url,data)
        print login.text
        
Пример #4
0
class TestLogin(unittest.TestCase):
    def setUp(self):
        self.client = SharkClient('debug')

    def test_login(self):
        url = 'http://dev.shark.kuaikuaiyu.com/api.login?platform=android&version=0,21'
        user_token1 = hashlib.md5()
        user_token1.update(str(time.time()))
        user_token = user_token1.hexdigest()
        res = self.client.login_sms('15011431186')
        verify_code = self.client.query_verify_code('15011431186')
        print verify_code
        print user_token
        data = {
            'mobile': '15011431186',
            'code': verify_code,
            'user_token': user_token,
            'rdid': _DEVICE_ID,
            'bb': _BB,
        }
        login = requests.post(url, data)
        print login.text