Ejemplo n.º 1
0
 def test_queue_contents_after_flat_multipart_post(self):
     queue_name = randomstring.id_generator()
     path = '/{}/{}'.format(settings.PATH_PREFIX, queue_name)
     response = self.client.post(path, self.flat)
     self.assertEqual(response.status_code, 200)
     queue_message = get_message(settings.MQ_URI, queue_name)
     self.assertEqual(self.flat, queue_message)
Ejemplo n.º 2
0
 def test_queue_contents_after_nested_json_post(self):
     queue_name = randomstring.id_generator()
     path = '/{}/{}'.format(settings.PATH_PREFIX, queue_name)
     response = self.post_json(path, self.json)
     self.assertEqual(response.status_code, 200)
     queue_message = get_message(settings.MQ_URI, queue_name)
     self.assertEqual(self.nested, queue_message)