def test_info(self): ''' Test to display the Subversion information from the checkout. ''' mock = MagicMock(side_effect=[{'retcode': 0, 'stdout': True}, {'retcode': 0, 'stdout': 'A\n\nB'}, {'retcode': 0, 'stdout': 'A\n\nB'}]) with patch.dict(svn.__salt__, {'cmd.run_all': mock}): self.assertTrue(svn.info('cwd', fmt='xml')) self.assertListEqual(svn.info('cwd', fmt='list'), [[], []]) self.assertListEqual(svn.info('cwd', fmt='dict'), [{}, {}])
def test_info(self): """ Test to display the Subversion information from the checkout. """ mock = MagicMock(side_effect=[ { "retcode": 0, "stdout": True }, { "retcode": 0, "stdout": "A\n\nB" }, { "retcode": 0, "stdout": "A\n\nB" }, ]) with patch.dict(svn.__salt__, {"cmd.run_all": mock}): self.assertTrue(svn.info("cwd", fmt="xml")) self.assertListEqual(svn.info("cwd", fmt="list"), [[], []]) self.assertListEqual(svn.info("cwd", fmt="dict"), [{}, {}])