Ejemplo n.º 1
0
    def test_push(self):
        commit_files(['file2.txt'], 'add file2')
        clone_rev = git_utils.get_latest_commit('master')
        git_utils.push_branch('origin', 'master')

        with pushd(self.origin):
            origin_rev = git_utils.get_latest_commit('master')
            self.assertEqual(origin_rev, clone_rev)
Ejemplo n.º 2
0
    def test_force_push(self):
        with pushd(self.origin):
            commit_file('file2.txt', 'add file2')

        commit_file('file2.txt', 'add file2 from clone')
        clone_rev = git_utils.get_latest_commit('master')
        git_utils.push_branch('origin', 'master', force=True)

        with pushd(self.origin):
            origin_rev = git_utils.get_latest_commit('master')
            self.assertEqual(origin_rev, clone_rev)