Skip to content

Commit

Permalink
fixup! Improve admin list pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Syriiin committed Jun 10, 2024
1 parent 7917bf5 commit c289f0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
7 changes: 3 additions & 4 deletions leaderboards/test_models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import pytest

from leaderboards.models import Invite, Leaderboard, Membership
from profiles.models import OsuUser


@pytest.mark.django_db
class TestLeaderboard:
def test_magic_str(self, leaderboard: Leaderboard):
assert str(leaderboard) == "[STANDARD] test leaderboard"
assert str(leaderboard) == "test leaderboard"

def test_get_pp_record(self):
# TODO: this
Expand All @@ -29,7 +28,7 @@ def test_update_member_count(self):
@pytest.mark.django_db
class TestMembership:
def test_magic_str(self, membership: Membership):
assert str(membership) == "[STANDARD] test leaderboard: TestOsuUser"
assert str(membership) == "test leaderboard: TestOsuUser"

def test_recalculate(self):
# TODO: this
Expand All @@ -39,4 +38,4 @@ def test_recalculate(self):
@pytest.mark.django_db
class TestInvite:
def test_magic_str(self, invite: Invite):
assert str(invite) == "[STANDARD] test leaderboard: TestOsuUser"
assert str(invite) == "test leaderboard: TestOsuUser"
3 changes: 0 additions & 3 deletions profiles/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def test_update_difficulty_values(self, beatmap: Beatmap):

@pytest.mark.django_db
class TestScore:
def test_magic_str(self, score: Score):
assert str(score) == "1: 395pp"

def test_process(self, score: Score):
score.process()
assert score.result == ScoreResult.END_CHOKE
Expand Down
2 changes: 1 addition & 1 deletion users/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def score_filter_preset(self, user: User, score_filter: ScoreFilter):
)

def test_magic_str(self, score_filter_preset):
assert str(score_filter_preset) == f"{score_filter_preset.user_id}: Hidden"
assert str(score_filter_preset) == f"Hidden"

0 comments on commit c289f0e

Please sign in to comment.