def test_normal_getDoctorInfoService(self): try: assert client_api_().getDoctorInfoService(self.getPhrcode(self.accountName), self.deviceId) is not None print client_api_().getDoctorInfoService(self.getPhrcode(self.accountName), self.deviceId) except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getVerifyCodeByDeviceId(self): try: assert client_api_().getVerifyCodeByDeviceId(self.getPhrcode(self.accountName)) is not None print client_api_().getVerifyCodeByDeviceId(self.getPhrcode(self.accountName)) except BaseException , ex : print ex.message self.error(ex)
def test_normal_updateMemeberHealthInfo(self): try: getmemhealinfo = client_api_().getMemberHealthInfo(self.getPhrcode(self.accountName)) getmemhealinfo.phrLifestyle.smokingStateCode = '1' assert client_api_().updateMemeberHealthInfo(self.getPhrcode(self.accountName),getmemhealinfo) is None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getFamilyInfosByUserId(self): try: assert [client_api_().getFamilyInfosByUserId(self.getPhrcode(self.accountName))] is not None lis = [client_api_().getFamilyInfosByUserId(self.getPhrcode(self.accountName))] print lis[0] except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getServiceRecords(self): a = client_api_().getAllServices(self.deviceId) b = 1 if len(a) > 0 : b = a[0].id try: assert client_api_().getServiceRecords(self.deviceId,b) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getphotoInfoByurl(self): a = client_api_().getphotoBydeviceID(self.deviceId) b = [] for i in a: print i.photourl b.append(i.photourl) try: assert client_api_().getphotoInfoByurl(b) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_deleteAccountsByDeviceId(self): try: assert client_api_().deleteAccountsByDeviceId(self.getPhrcode(self.accountName), self.deviceId) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_checkBindstate(self): try: assert client_api_().checkBindstate(self.deviceId, self.getPhrcode(self.accountName)) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getHealthReportLists(self): try: assert client_api_().getHealthReportLists(self.getPhrcode(self.accountName)) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_serviceCardGetUserPoints(self): try: assert client_api_().serviceCardGetUserPoints(self.getPhrcode(self.accountName)) >= 0 except BaseException , ex : print ex.message self.error_normal(ex)
def test_sym_BindCardToPerson(self): try: assert client_api_().BindCardToPerson(self.deviceId,self.symcardid,self.password,self.getPhrcode(self.accountName)) is not None except BaseException , ex : print ex.message self.error(ex)
def test_normal_getUserNameByUserID(self): try: # print client_api_().getUserNameByUserID(self.getPhrcode(self.accountName)) assert client_api_().getUserNameByUserID(self.getPhrcode(self.accountName)) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_getHealthReportListsByFamilyId(self): phr = self.getPhrcode(self.accountName) familyid = self.getfamilyid(self.deviceId) try: assert client_api_().getHealthReportListsByFamilyId(phr,familyid) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_unBindDeviceByFamilyId(self): familyid = self.getfamilyid(self.deviceId) print familyid try: assert client_api_().unBindDeviceByFamilyId(familyid,self.deviceId) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_messageNotify(self): a = client_api_().getAllServices(self.deviceId) b = MessageInfo() time1 = int(time.time()) msgtime = str(time1) if len(a) > 0 : b.serviceid = a[0].id b.fromPerson = self.getPhrcode(self.accountName) b.toPerson = self.getPhrcode(self.accountName) b.messageTime = msgtime b.messageType = '2' b.messageContent = '123wer' b.deviceid = self.deviceId try: assert client_api_().messageNotify(b) is None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_updateServiceRecords(self): #mac地址需要绑定家庭和服务 try: a = client_api_().getAllServices('awifidc:44:27:96:e9:63') serviceid = 1 if len(a) > 0 : serviceid = a[0].id b = client_api_().getServiceRecords('awifidc:44:27:96:e9:63',serviceid) recordid = 1 if len(b) > 0 : recordid = b[0].recordId assert client_api_().updateServiceRecords(recordid) is not None except BaseException , ex : print ex.message self.error_normal(ex)
def test_normal_bindDeviceByUserId(self): try: assert client_api_().bindDeviceByUserId(self.getPhrcode(self.accountName), self.deviceId) is None except BaseException , ex : self.error_normal(ex)
def test_mix_getOutsideListByDeviceId(self): try: assert client_api_().getOutsideListByDeviceId(self.mixdeviceId) is not None except BaseException , ex : self.error(ex)
def test_mix_checkBindStateByDeviceID(self): try: assert client_api_().checkBindStateByDeviceID(self.mixdeviceId) is not None except BaseException , ex : self.error(ex)
def test_sym_getNewphotoBydeviceID(self): try: assert client_api_().getNewphotoBydeviceID(self.deviceId,self.accountName) is not None except BaseException , ex : self.error(ex)
def test_short_getNewRecipeListByUserID(self): try: assert client_api_().getNewRecipeListByUserID(self.shoraccountName) is not None except BaseException , ex : self.error(ex)
def test_normal_registerAndBindAccount(self): try: assert client_api_().registerAndBindAccount(self.deviceId) is not None except BaseException , ex : self.error_normal(ex)
def test_sym_serviceCardLoginByCardNum(self): try: assert client_api_().serviceCardLoginByCardNum(self.symcardid) is not None except BaseException , ex : self.error(ex)
def test_sym_serviceLoginByProofNum(self): try: assert client_api_().serviceLoginByProofNum(self.symidentify, self.deviceId) is not None except BaseException , ex : self.error(ex)
def test_mix_editPassword(self): try: assert client_api_().editPassword(self.getPhrcode(self.accountName), self.password, self.mixpassword) is None except BaseException , ex : self.error(ex)
def test_sym_findXKAccountByProofNum(self): try: assert client_api_().findXKAccountByProofNum(self.symidentify).userId is None except BaseException , ex : self.error(ex)
def test_mix_deleteAccountsByDeviceId(self): try: assert client_api_().deleteAccountsByDeviceId(self.getPhrcode(self.accountName), self.mixdeviceId) is not None except BaseException , ex : self.error(ex)
def test_mix_getCaregiverInfoService(self): try: assert client_api_().getCaregiverInfoService(self.getPhrcode(self.accountName), self.mixdeviceId) is not None except BaseException , ex : self.error(ex)
def test_short_registerAndBindAccount(self): try: assert client_api_().registerAndBindAccount(self.shordeviceId) is not None except BaseException , ex : self.error(ex)
def test_mix_bindDeviceByUserId(self): try: assert client_api_().bindDeviceByUserId(self.getPhrcode(self.accountName), self.mixdeviceId) is not None except BaseException , ex : self.error(ex)