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): 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 get_message(self): command = CreateTargetedMessageCommand() command.auth = PW_TOKEN command.content = "Hello world!" command.devices_filter = ApplicationFilter(PW_APP_CODE) tomorrow = datetime.datetime.today() + datetime.timedelta(1) command.send_date = tomorrow.strftime('%Y-%m-%d %H:%M:%S') response = self.client.invoke(command) return response['response']['messageCode']