Skip to content

Commit

Permalink
[BugFix] Fix modify leaderboard data tests (#4204)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchhablani authored Nov 1, 2023
1 parent 463a004 commit fa308f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/unit/challenges/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6073,8 +6073,8 @@ def test_get_leaderboard_data_when_not_staff(self):
self.assertEqual(response.data, expected)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)

def test_update_leaderboard_data_when_not_staff(self):
self.url = reverse_lazy("challenges:update_leaderboard_data")
def test_modify_leaderboard_data_when_not_staff(self):
self.url = reverse_lazy("challenges:modify_leaderboard_data")
self.user.is_staff = False
self.user.save()
expected = {
Expand All @@ -6084,9 +6084,9 @@ def test_update_leaderboard_data_when_not_staff(self):
self.assertEqual(response.data, expected)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)

def test_update_leaderboard_data_success(self):
def test_modify_leaderboard_data_success(self):
self.url = reverse_lazy(
"challenges:update_leaderboard_data")
"challenges:modify_leaderboard_data")
data = {"leaderboard_data": self.leaderboard_data.pk,
"is_disabled": 0
}
Expand All @@ -6097,8 +6097,8 @@ def test_update_leaderboard_data_success(self):
self.assertEqual(response.data, expected)
self.assertEqual(response.status_code, status.HTTP_200_OK)

def test_update_leaderboard_data_with_other_parameters(self):
self.url = reverse_lazy("challenges:update_leaderboard_data")
def test_modify_leaderboard_data_with_other_parameters(self):
self.url = reverse_lazy("challenges:modify_leaderboard_data")
data = {"leaderboard": self.leaderboard.pk,
"challenge_phase_split": self.challenge_phase_split.pk,
"submission": self.submission.pk,
Expand Down

0 comments on commit fa308f1

Please sign in to comment.