Skip to content

Commit f564187

Browse files
Backend: Update ChallengeAdmin to replace 'featured' with 'remote_evaluation' in list_display and add unit test for filtering challenges by remote_evaluation. (#5000)
1 parent 68f4a61 commit f564187

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/challenges/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ChallengeAdmin(ImportExportTimeStampedAdmin):
5151
"creator",
5252
"published",
5353
"approved_by_admin",
54-
"featured",
54+
"remote_evaluation",
5555
"created_at",
5656
"workers",
5757
"task_def_arn",
@@ -63,7 +63,7 @@ class ChallengeAdmin(ImportExportTimeStampedAdmin):
6363
"is_registration_open",
6464
"enable_forum",
6565
"anonymous_leaderboard",
66-
"featured",
66+
"remote_evaluation",
6767
"start_date",
6868
"end_date",
6969
)

tests/unit/challenges/test_admin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,18 @@ def test_list_display_contains_expected_fields(self):
159159
"creator",
160160
"published",
161161
"approved_by_admin",
162-
"featured",
162+
"remote_evaluation",
163163
"created_at",
164164
"workers",
165165
"task_def_arn",
166166
"github_repository",
167167
)
168168
self.assertEqual(self.admin.list_display, expected_fields)
169169

170+
def test_list_filter_contains_remote_evaluation(self):
171+
"""list_filter should include remote_evaluation for filtering challenges."""
172+
self.assertIn("remote_evaluation", self.admin.list_filter)
173+
170174

171175
class TestChallengeAdminSearch(TestCase):
172176
"""Tests for ChallengeAdmin search functionality."""

0 commit comments

Comments
 (0)