Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansiegel committed Jul 10, 2024
1 parent 22c9b15 commit 2b2e98a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/git_api/test_git_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,15 @@ def test_pull_rebase_master_single_commit(self, logging_mock):
outfile.write("local file")
local_repo = Repo(testee.get_full_file_path("."))
local_repo.git.add("--all")
local_repo.git.commit("-m", "local commit", "--author", "local <[email protected]>")
local_repo.config_writer().set_value("user", "email", "[email protected]").release()
local_repo.git.commit("-m", "local commit")

# origin commit
with Path(f"{origin_repo.working_dir}/origin.md").open("w") as readme:
readme.write("origin file")
origin_repo.git.add("--all")
origin_repo.git.commit("-m", "origin commit", "--author", "origin <[email protected]>")
origin_repo.config_writer().set_value("user", "email", "[email protected]").release()
origin_repo.git.commit("-m", "origin commit")

# pull and rebase from remote
logging_mock.reset_mock()
Expand Down Expand Up @@ -360,13 +362,15 @@ def test_pull_rebase_remote_branch_single_commit(self, logging_mock):
outfile.write("local file")
local_repo = Repo(testee.get_full_file_path("."))
local_repo.git.add("--all")
local_repo.git.commit("-m", "local branch commit", "--author", "local <[email protected]>")
local_repo.config_writer().set_value("user", "email", "[email protected]").release()
local_repo.git.commit("-m", "local branch commit")

# origin commit
with Path(f"{origin_repo.working_dir}/origin.md").open("w") as readme:
readme.write("origin file")
origin_repo.git.add("--all")
origin_repo.git.commit("-m", "origin branch commit", "--author", "origin <[email protected]>")
origin_repo.config_writer().set_value("user", "email", "[email protected]").release()
origin_repo.git.commit("-m", "origin branch commit")

# pull and rebase from remote
logging_mock.reset_mock()
Expand Down

0 comments on commit 2b2e98a

Please sign in to comment.