示例#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': ''})
示例#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': ''})
示例#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': ''})
示例#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": ""}