Skip to content

Commit de437c7

Browse files
committed
tests
1 parent b5f4d50 commit de437c7

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

tests/sentry/api/endpoints/test_team_projects.py

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ def test_builtin_symbol_sources_not_electron(self):
368368

369369
def test_builtin_symbol_sources_unity(self):
370370
"""
371-
Test that project option for builtin symbol sources contains ["unity"] when creating
372-
a Unity project, but uses defaults for other platforms.
371+
Test that project option for builtin symbol sources contains relevant buckets
372+
when creating a Unity project, but uses defaults for other platforms.
373373
"""
374374
response = self.get_success_response(
375375
self.organization.slug,
@@ -385,7 +385,50 @@ def test_builtin_symbol_sources_unity(self):
385385
symbol_sources = ProjectOption.objects.get_value(
386386
project=unity_project, key="sentry:builtin_symbol_sources"
387387
)
388-
assert symbol_sources == ["unity"]
388+
assert symbol_sources == ["unity", "nvidia", "ubuntu"]
389+
390+
def test_builtin_symbol_sources_unreal(self):
391+
"""
392+
Test that project option for builtin symbol sources contains relevant buckets
393+
when creating a Unreal project, but uses defaults for other platforms.
394+
"""
395+
response = self.get_success_response(
396+
self.organization.slug,
397+
self.team.slug,
398+
name="unreal-app",
399+
slug="unreal-app",
400+
platform="unreal",
401+
status_code=201,
402+
)
403+
404+
unreal_project = Project.objects.get(id=response.data["id"])
405+
assert unreal_project.platform == "unreal"
406+
unreal_project = ProjectOption.objects.get_value(
407+
project=unreal_project, key="sentry:builtin_symbol_sources"
408+
)
409+
assert symbol_sources == ["nvidia", "ubuntu"]
410+
411+
412+
def test_builtin_symbol_sources_godot(self):
413+
"""
414+
Test that project option for builtin symbol sources contains relevant buckets
415+
when creating a Godot project, but uses defaults for other platforms.
416+
"""
417+
response = self.get_success_response(
418+
self.organization.slug,
419+
self.team.slug,
420+
name="godot-app",
421+
slug="godot-app",
422+
platform="godot",
423+
status_code=201,
424+
)
425+
426+
godot_project = Project.objects.get(id=response.data["id"])
427+
assert godot_project.platform == "godot"
428+
symbol_sources = ProjectOption.objects.get_value(
429+
project=godot_project, key="sentry:builtin_symbol_sources"
430+
)
431+
assert symbol_sources == ["nvidia", "ubuntu"]
389432

390433
@patch("sentry.api.endpoints.team_projects.TeamProjectsEndpoint.create_audit_entry")
391434
def test_create_project_with_origin(self, create_audit_entry):

0 commit comments

Comments
 (0)