test_messaging.py 459 B

1234567891011121314
  1. import unittest
  2. from celery.messaging 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.assertEquals(result["mandatory"], True)
  10. self.assertEquals(result["routing_key"], "foo.xuzzy")