Skip to content

Commit

Permalink
Autogenerate pullid for test
Browse files Browse the repository at this point in the history
This is fragile because hard-coding the pullid is more likely to run into conflicts
  • Loading branch information
michelletran-codecov committed Oct 31, 2024
1 parent edd500f commit 22823f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tasks/tests/unit/test_manual_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ def test_manual_upload_completion_trigger(
"app.tasks.compute_comparison.ComputeComparison": mocker.MagicMock(),
},
)

commit = CommitFactory.create(pullid=10)
pull = PullFactory.create(
repository=commit.repository, head=commit.commitid, pullid=commit.pullid
)
commit = CommitFactory.create()
pull = PullFactory.create(repository=commit.repository, head=commit.commitid)
commit.pullid = pull.pullid
upload = UploadFactory.create(report__commit=commit)
compared_to = CommitFactory.create(repository=commit.repository)
pull.compared_to = compared_to.commitid
Expand Down

0 comments on commit 22823f0

Please sign in to comment.