Example #1
0
    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'), [{}, {}])
Example #2
0
    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'), [{}, {}])
Example #3
0
    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"), [{}, {}])