Example #1
0
 def test_directives(self):
     '''
     Test if return list of directives
     '''
     mock = MagicMock(return_value="Salt")
     with patch.dict(apache.__salt__, {'cmd.run': mock}):
         self.assertEqual(apache.directives(), {'Salt': ''})
Example #2
0
 def test_directives(self):
     '''
     Test if return list of directives
     '''
     mock = MagicMock(return_value="Salt")
     with patch.dict(apache.__salt__, {'cmd.run': mock}):
         self.assertEqual(apache.directives(), {'Salt': ''})
Example #3
0
 def test_directives(self):
     '''
     Test if return list of directives
     '''
     with patch('salt.modules.apache._detect_os',
                MagicMock(return_value='apachectl')):
         mock = MagicMock(return_value="Salt")
         with patch.dict(apache.__salt__, {'cmd.run': mock}):
             self.assertEqual(apache.directives(), {'Salt': ''})
Example #4
0
 def test_directives(self):
     """
     Test if return list of directives
     """
     with patch("salt.modules.apache._detect_os",
                MagicMock(return_value="apachectl")):
         mock = MagicMock(return_value="Salt")
         with patch.dict(apache.__salt__, {"cmd.run": mock}):
             assert apache.directives() == {"Salt": ""}