Skip to content

Commit

Permalink
#108 backend: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni000 committed Mar 25, 2024
1 parent 476fdac commit 9cb78c9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.test import TransactionTestCase
from game.models import User
from .factories import PatientFactory
from rest_framework.authtoken.models import Token
from configuration.asgi import application
from channels.testing import WebsocketCommunicator
Expand All @@ -9,8 +10,9 @@ class PatientWebSocketTest(TransactionTestCase):
def setUp(self):
super().setUp()
# Create a user and token for testing
self.user = User.objects.create_user(username="testpatient123", password="test")
self.user = User.objects.create_user(username="123456", password="test")
self.token, _ = Token.objects.get_or_create(user=self.user)
self.patient = PatientFactory()

async def test_authenticated_websocket_connection(self):
# Connect to the WebSocket
Expand Down

0 comments on commit 9cb78c9

Please sign in to comment.