def test_device_mobile(self): reg_id = '1507bfd3f7c466c355c' entity = jpush.device_mobile("18588232140") result = device.set_devicemobile(reg_id, entity) self.assertEqual(result.status_code, 200)
import jpush as jpush from conf import app_key, master_secret _jpush = jpush.JPush(app_key, master_secret) _jpush.set_logging("DEBUG") device = _jpush.create_device() reg_id = '160a3797c80d93ce897' entity = jpush.device_mobile("13488888888") device.set_devicemobile(reg_id, entity)
import jpush as jpush from conf import app_key, master_secret _jpush = jpush.JPush(app_key, master_secret) _jpush.set_logging("DEBUG") device = _jpush.create_device() reg_id = '1507bfd3f7c466c355c' entity = jpush.device_mobile("18588232140") device.set_devicemobile(reg_id, entity)
def test_device_mobile(self): reg_id = '160a3797c80d93ce897' entity = jpush.device_mobile("18588888888") result = device.set_devicemobile(reg_id, entity) self.assertEqual(result.status_code, 200)
def post(self, request): reg_id = self.request.data.get('reg_id') mobile = self.request.data.get('mobile') entity = jpush.device_mobile(mobile) res = self.my_device.set_devicemobile(registration_id=reg_id, entity=entity) return Response(res.payload)