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']})
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"] }, )