def setUp(self): super(TestCreateTargetedMessageCommand, self).setUp() self.client = client.PushwooshClient() self.command = CreateTargetedMessageCommand() self.command.auth = PW_TOKEN self.command.content = "Hello world!"
def setUp(self): super(TestCreateMessageCommand, self).setUp() self.client = client.PushwooshClient() self.notification = Notification() self.notification.content = 'Hello world!' self.auth = PW_TOKEN
def setUp(self): self.code = '0000-0000' self.auth = 'test_auth' self.client = client.PushwooshClient() self.command = CreateTargetedMessageCommand() self.command.auth = self.auth self.command.content = "Hello world!"
def perform_create(self, serializer): hwid = serializer.validated_data.pop("hwid") language = serializer.validated_data.pop("language") push_client = client.PushwooshClient() command = RegisterDeviceCommand(yak_settings.PUSHWOOSH_APP_CODE, hwid, constants.PLATFORM_IOS, serializer.validated_data["token"], language) response = push_client.invoke(command) if response["status_code"] != 200: raise AuthenticationFailed("Authentication with notification service failed") serializer.save(user=self.request.user)
def setUp(self): super(TestDeviceCommands, self).setUp() self.client = client.PushwooshClient() self.auth = PW_TOKEN self.hwid = str(uuid.uuid4()) self.push_token = str(uuid.uuid4()) self.app_code = PW_APP_CODE # Register device for tests command = RegisterDeviceCommand(self.app_code, self.hwid, constants.PLATFORM_ANDROID, self.push_token) self.client.invoke(command)
def setUp(self): if PW_TOKEN is None: raise unittest.case.SkipTest( 'Environment variable PW_TOKEN is not set.') if PW_APP_CODE is None: raise unittest.case.SkipTest( 'Environment variable PW_APP_CODE is not set.') if PW_APP_GROUP_CODE is None: raise unittest.case.SkipTest( 'Environment variable PW_APP_GROUP_CODE is not set.') self.client = client.PushwooshClient() self.client.debug = True super(IntegrationTestCase, self).setUp()
def setUp(self): self.client = client.PushwooshClient() self.notification = Notification() self.notification.content = 'Hello world!' self.auth = 'test_auth' self.code = '0000-0000'
def setUp(self): self.client = client.PushwooshClient() self.auth = 'test_auth' self.hwid = str(uuid.uuid4()) self.push_token = str(uuid.uuid4()) self.app_code = '0000-0000'
def setUp(self): self.client = client.PushwooshClient() self.command = CompileFilterCommand() self.code = '0000-0000'
def setUp(self): self.client = client.PushwooshClient() self.command = DeleteMessageCommand() self.auth = 'Test auth' self.command.auth = self.auth
def setUp(self): super(TestDeleteMessageCommand, self).setUp() self.client = client.PushwooshClient() self.command = DeleteMessageCommand()
def setUp(self): super(TestCompileFilterCommand, self).setUp() self.client = client.PushwooshClient() self.command = CompileFilterCommand()