def test_consumers_functions(self): # TO DO client = HttpClient() user = User.objects.create_user( username='******', email='*****@*****.**', password='******') client.login(username='******', password='******') client2 = HttpClient() user = User.objects.create_user( username='******', email='*****@*****.**', password='******') client.login(username='******', password='******') client.send_and_consume('websocket.receive', text='hello')
def test_consumers_functions(self): # TO DO client = HttpClient() user = User.objects.create_user(username='******', email='*****@*****.**', password='******') client.login(username='******', password='******') client2 = HttpClient() user = User.objects.create_user(username='******', email='*****@*****.**', password='******') client.login(username='******', password='******') client.send_and_consume('websocket.receive', text='hello')
def connect_as_driver(self, driver): client = HttpClient() client.login(username=driver.username, password=PASSWORD) client.send_and_consume('websocket.connect', path='/driver/') return client
def test_passenger_can_connect_via_websockets(self): client = HttpClient() client.login(username=self.passenger.username, password='******') client.send_and_consume('websocket.connect', path='/passenger/') message = client.receive() self.assertIsNone(message)