def test_version(self): ''' Test if it return poudriere version. ''' mock = MagicMock(return_value='9.0-RELEASE') with patch.dict(poudriere.__salt__, {'cmd.run': mock}): self.assertEqual(poudriere.version(), '9.0-RELEASE')
def test_version(): """ Test if it return poudriere version. """ mock = MagicMock(return_value="9.0-RELEASE") with patch.dict(poudriere.__salt__, {"cmd.run": mock}): assert poudriere.version() == "9.0-RELEASE"
def test_version(self): ''' Test if it return poudriere version. ''' mock = MagicMock(return_value='9.0-RELEASE') with patch.dict(poudriere.__salt__, {'cmd.run': mock}): self.assertEqual(poudriere.version(), '9.0-RELEASE')