Exemple #1
0
	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')
Exemple #2
0
    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')
Exemple #3
0
 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
Exemple #4
0
 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)