@@ -0,0 +1,1906 @@
+# -*- coding: utf-8 -*-%0A'''%0ATests for the Mandrill execution module.%0A'''%0A%0A# Import Python Libs%0Afrom __future__ import absolute_import%0A%0A# Import Salt Testing Libs%0Afrom tests.support.mixins import LoaderModuleMockMixin%0Afrom tests.support.unit import TestCase, skipIf%0Afrom tests.support.mock import (%0A    patch,%0A    MagicMock,%0A    NO_MOCK,%0A    NO_MOCK_REASON%0A)%0A%0A# Import Salt Libs%0Aimport salt.modules.mandrill as mandrill%0A%0A# Test data%0ATEST_SEND = %7B%0A    'result': True,%0A    'comment': '',%0A    'out': %5B%0A        %7B%0A            'status': 'sent',%0A            '_id': 'c4353540a3c123eca112bbdd704ab6',%0A            'email': 'recv@example.com',%0A            'reject_reason': None%0A        %7D%0A    %5D%0A%7D%0A%0A%0A@skipIf(NO_MOCK, NO_MOCK_REASON)%0Aclass MandrillModuleTest(TestCase, LoaderModuleMockMixin):%0A    '''%0A    Test cases for salt.modules.mandrill.%0A    '''%0A    def setup_loader_modules(self):%0A        module_globals = %7B%0A            mandrill: %7B%0A                '__salt__': %7B%0A                    'config.merge': MagicMock(return_value=%7B%0A                        'mandrill': %7B%0A                            'key': '2orgk34kgk34g'%0A                        %7D%0A                    %7D)%0A                %7D%0A            %7D%0A        %7D%0A        if mandrill.HAS_REQUESTS is False:%0A            module_globals%5B'sys.modules'%5D = %7B'requests': MagicMock()%7D%0A        return module_globals%0A%0A    def test_send(self):%0A        '''%0A        Test the send function.%0A        '''%0A        mock_cmd = MagicMock(return_value=TEST_SEND)%0A        with patch.object(mandrill, 'send', mock_cmd) as send:%0A            self.assertEqual(%0A                send(message=%7B%0A                        'subject': 'Hi',%0A                        'from_email': 'test@example.com',%0A                        'to': %5B%0A                            %7B'email': 'recv@example.com', 'type': 'to'%7D%0A                        %5D%0A                    %7D%0A                ),%0A                TEST_SEND%0A            )%0A

Add tests for the mandrill execution module