def test_pull(self): ''' Test for Perform a pull on the given repository ''' with patch.dict(hg.__salt__, {'cmd.run': MagicMock(return_value='A')}): self.assertEqual(hg.pull('cwd'), 'A')
def test_pull(self): ''' Test for Perform a pull on the given repository ''' with patch.dict(hg.__salt__, {'cmd.run_all': MagicMock(return_value={'retcode': 0, 'stdout': 'A'})}): self.assertEqual(hg.pull('cwd'), 'A')
def test_pull(self): ''' Test for Perform a pull on the given repository ''' with patch.object(hg, '_check_hg', return_value=None): with patch.dict(hg.__salt__, {'cmd.run': MagicMock(return_value='A')}): self.assertEqual(hg.pull('cwd'), 'A')
def test_pull(self): """ Test for Perform a pull on the given repository """ with patch.dict( hg.__salt__, { "cmd.run_all": MagicMock(return_value={ "retcode": 0, "stdout": "A" }) }, ): self.assertEqual(hg.pull("cwd"), "A")