def test_version(self): ''' test to show installed version of dnsmasq. ''' mock = MagicMock(return_value='A B C') with patch.dict(dnsmasq.__salt__, {'cmd.run': mock}): self.assertEqual(dnsmasq.version(), "C")
def test_version(self): """ test to show installed version of dnsmasq. """ mock = MagicMock(return_value="A B C") with patch.dict(dnsmasq.__salt__, {"cmd.run": mock}): self.assertEqual(dnsmasq.version(), "C")