コード例 #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
ファイル: apache_test.py プロジェクト: DaveQB/salt
 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
ファイル: test_apache.py プロジェクト: wyardley/salt
 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": ""}