Skip to content

Commit 2b2e98a

Browse files
fix test
1 parent 22c9b15 commit 2b2e98a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/git_api/test_git_repo.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,15 @@ def test_pull_rebase_master_single_commit(self, logging_mock):
324324
outfile.write("local file")
325325
local_repo = Repo(testee.get_full_file_path("."))
326326
local_repo.git.add("--all")
327-
local_repo.git.commit("-m", "local commit", "--author", "local <[email protected]>")
327+
local_repo.config_writer().set_value("user", "email", "[email protected]").release()
328+
local_repo.git.commit("-m", "local commit")
328329

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

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

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

371375
# pull and rebase from remote
372376
logging_mock.reset_mock()

0 commit comments

Comments
 (0)