Skip to content

Commit 1695b85

Browse files
committed
Use constant in tests
1 parent 1f8a57c commit 1695b85

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

upload/tests/views/test_bundle_analysis.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
OrganizationLevelTokenFactory,
1111
)
1212
from shared.django_apps.core.tests.factories import CommitFactory, RepositoryFactory
13+
from shared.events.amplitude import UNKNOWN_USER_OWNERID
1314

1415
from core.models import Commit
1516
from services.redis_configuration import get_redis_connection
@@ -110,7 +111,7 @@ def test_upload_bundle_analysis_success(db, client, mocker, mock_redis):
110111
mock_amplitude.assert_called_with(
111112
"Upload Sent",
112113
{
113-
"user_ownerid": -1,
114+
"user_ownerid": UNKNOWN_USER_OWNERID,
114115
"ownerid": commit.repository.author.ownerid,
115116
"repoid": commit.repository.repoid,
116117
"commitid": commit.id,

upload/tests/views/test_test_results.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
OwnerFactory,
1414
RepositoryFactory,
1515
)
16+
from shared.events.amplitude import UNKNOWN_USER_OWNERID
1617

1718
from services.redis_configuration import get_redis_connection
1819
from services.task import TaskService
@@ -122,7 +123,7 @@ def test_upload_test_results(db, client, mocker, mock_redis):
122123
mock_amplitude.assert_called_with(
123124
"Upload Sent",
124125
{
125-
"user_ownerid": -1,
126+
"user_ownerid": UNKNOWN_USER_OWNERID,
126127
"ownerid": commit.repository.author.ownerid,
127128
"repoid": commit.repository.repoid,
128129
"commitid": commit.id,

0 commit comments

Comments
 (0)