コード例 #1
0
ファイル: dnsmasq_test.py プロジェクト: bryson/salt
 def test_fullversion(self):
     '''
     Test to Show installed version of dnsmasq and compile options.
     '''
     mock = MagicMock(return_value='A B C\nD E F G H I')
     with patch.dict(dnsmasq.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(dnsmasq.fullversion(),
                              {'version': 'C',
                               'compile options': ['G', 'H', 'I']})
コード例 #2
0
 def test_fullversion(self):
     '''
     Test to Show installed version of dnsmasq and compile options.
     '''
     mock = MagicMock(return_value='A B C\nD E F G H I')
     with patch.dict(dnsmasq.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(dnsmasq.fullversion(),
                              {'version': 'C',
                               'compile options': ['G', 'H', 'I']})
コード例 #3
0
 def test_fullversion(self):
     """
     Test to Show installed version of dnsmasq and compile options.
     """
     mock = MagicMock(return_value="A B C\nD E F G H I")
     with patch.dict(dnsmasq.__salt__, {"cmd.run": mock}):
         self.assertDictEqual(
             dnsmasq.fullversion(),
             {
                 "version": "C",
                 "compile options": ["G", "H", "I"]
             },
         )