Fix friend_code max length issues in tests, and fix in_game_name length issues, also update tests to fit more scenarios

This commit is contained in:
badblocks 2025-03-27 17:26:07 -07:00
parent 0d4655bf80
commit b9c4d7a61d
10 changed files with 558 additions and 66 deletions

View file

@ -10,6 +10,7 @@ from collections import OrderedDict
from unittest.mock import patch, MagicMock
from django.core.exceptions import ObjectDoesNotExist
import importlib
from tests.utils.rarity import RARITY_MAPPING
User = get_user_model()
@ -74,13 +75,13 @@ class HomePageViewTests(TestCase):
# Create trade offers with consistent rarities
cls.common_trade = TradeOffer.objects.create(
initiated_by=cls.friend_code,
rarity_icon='',
rarity_icon=RARITY_MAPPING[1],
rarity_level=1
)
cls.rare_trade = TradeOffer.objects.create(
initiated_by=cls.friend_code,
rarity_icon='★★★',
rarity_icon=RARITY_MAPPING[3],
rarity_level=3
)