Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 4d3578d

Browse files
committed
update with one more test
1 parent 91ada20 commit 4d3578d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/commands/commit/interactors/tests/test_get_latest_upload_error.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from unittest.mock import patch
2+
13
from django.test import TransactionTestCase
24
from shared.django_apps.core.tests.factories import (
35
CommitFactory,
@@ -82,3 +84,11 @@ async def test_when_single_error_then_returns_error(self):
8284
"error_code": UploadErrorEnum.UNKNOWN_PROCESSING,
8385
"error_message": "Some other error",
8486
}
87+
88+
async def test_return_none_on_raised_error(self):
89+
with patch(
90+
"core.commands.commit.interactors.get_latest_upload_error.GetLatestUploadErrorInteractor._get_latest_error",
91+
side_effect=Exception("Test error"),
92+
):
93+
result = await self.execute(commit=self.commit, owner=self.org)
94+
assert result is None

0 commit comments

Comments
 (0)