class TestDeleteMessageCommand(unittest.TestCase): def setUp(self): self.client = client.PushwooshClient() self.command = DeleteMessageCommand() self.auth = 'Test auth' self.command.auth = self.auth def test_valid_delete(self): message_code = 'message_code' expected_result = { 'request': { 'message': message_code, 'auth': self.auth } } self.command.message = message_code command_dict = json.loads(self.command.render()) self.assertDictEqual(command_dict, expected_result) def test_delete_without_message(self): self.assertRaises(PushwooshCommandException, self.command.compile)
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.command = DeleteMessageCommand()
def setUp(self): super(TestDeleteMessageCommand, self).setUp() self.client = client.PushwooshClient() self.command = DeleteMessageCommand()