Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KwikKill committed Oct 11, 2024
1 parent 1fd0e20 commit ff2cd7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backend/langate/network/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from rest_framework import status
from rest_framework.test import APIClient

from langate.settings import SETTINGS
from langate.network.models import DeviceManager, Device, UserDevice
from langate.user.models import User, Role
from .serializers import FullDeviceSerializer
Expand Down Expand Up @@ -457,7 +458,8 @@ def test_get_user_device_list_success(self):
'whitelisted': False,
'ip': '123.123.123.123',
'user': 'testuser',
'area': 'LAN'
'area': 'LAN',
'mark': SETTINGS['marks'][0]['value']
}
]
}
Expand Down
4 changes: 3 additions & 1 deletion backend/langate/user/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ def test_get_user_list(self):
self.assertEqual(request.data["results"][0]["tournament"], self.admin.tournament)
self.assertEqual(request.data["results"][0]["team"], self.admin.team)

self.assertEqual(request.data["results"][0]["devices"], [])

# Verify the number of fields for the user
self.assertEqual(len(request.data["results"][0]), 9)
self.assertEqual(len(request.data["results"][0]), 10)

def test_get_user_list_not_logged_in(self):
"""
Expand Down

0 comments on commit ff2cd7c

Please sign in to comment.