def testNoCloneIfExists(self): # Setup os.mkdir(os.path.join(self.tempdir, 'config')) # Test cbuildbot._FetchInitialBootstrapConfigRepo('repo_url', None) # Verify self.assertEqual(self.mockGit.call_count, 0)
def testDoesCloneBranch(self): # Test cbuildbot._FetchInitialBootstrapConfigRepo('repo_url', 'test_branch') # Verify self.assertEqual(self.mockGit.mock_calls, [ mock.call(self.config_dir, ['clone', 'repo_url', self.config_dir]), mock.call(self.config_dir, ['checkout', 'test_branch']) ])
def testDoesCloneBranch(self): # Test cbuildbot._FetchInitialBootstrapConfigRepo('repo_url', 'test_branch') # Verify self.assertEqual( self.mockGit.mock_calls, [mock.call(self.config_dir, ['clone', 'repo_url', self.config_dir]), mock.call(self.config_dir, ['checkout', 'test_branch'])])
def testDoesClone(self): # Test cbuildbot._FetchInitialBootstrapConfigRepo('repo_url', None) # Verify self.mockGit.assert_called_once_with( self.config_dir, ['clone', 'repo_url', self.config_dir])