test_app_amqp.py 481 B

123456789101112131415
  1. from celery.tests.utils import unittest
  2. from celery.app.amqp import MSG_OPTIONS, extract_msg_options
  3. class TestMsgOptions(unittest.TestCase):
  4. def test_MSG_OPTIONS(self):
  5. self.assertTrue(MSG_OPTIONS)
  6. def test_extract_msg_options(self):
  7. testing = {"mandatory": True, "routing_key": "foo.xuzzy"}
  8. result = extract_msg_options(testing)
  9. self.assertEqual(result["mandatory"], True)
  10. self.assertEqual(result["routing_key"], "foo.xuzzy")