Exemplo n.º 1
0
 def test_clone(self):
     '''
     Test for Clone a new repository
     '''
     with patch.dict(hg.__salt__, {'cmd.run':
                                     MagicMock(return_value='A')}):
         self.assertEqual(hg.clone('cwd', 'repository'), 'A')
Exemplo n.º 2
0
 def test_clone(self):
     '''
     Test for Clone a new repository
     '''
     with patch.dict(hg.__salt__, {'cmd.run_all':
                                   MagicMock(return_value={'retcode': 0,
                                                           'stdout': 'A'})}):
         self.assertEqual(hg.clone('cwd', 'repository'), 'A')
Exemplo n.º 3
0
 def test_clone(self):
     '''
     Test for Clone a new repository
     '''
     with patch.object(hg, '_check_hg', return_value=None):
         with patch.dict(hg.__salt__,
                         {'cmd.run': MagicMock(return_value='A')}):
             self.assertEqual(hg.clone('cwd', 'repository'), 'A')
Exemplo n.º 4
0
 def test_clone(self):
     '''
     Test for Clone a new repository
     '''
     with patch.dict(hg.__salt__, {'cmd.run_all':
                                   MagicMock(return_value={'retcode': 0,
                                                           'stdout': 'A'})}):
         self.assertEqual(hg.clone('cwd', 'repository'), 'A')
Exemplo n.º 5
0
 def test_clone(self):
     """
     Test for Clone a new repository
     """
     with patch.dict(
             hg.__salt__,
         {
             "cmd.run_all":
             MagicMock(return_value={
                 "retcode": 0,
                 "stdout": "A"
             })
         },
     ):
         self.assertEqual(hg.clone("cwd", "repository"), "A")