예제 #1
0
 def test_auth_with_body(self, pusher):
     req = mock.Mock()
     req.POST = {}
     req.body = "channel_name=ch&socket_id=s1"
     pusher.authenticate.return_value = {}
     pusher_authenticate(req)
     pusher.authenticate.assert_called_with(channel='ch', socket_id='s1')
예제 #2
0
 def test_auth_with_body(self, pusher):
     req = mock.Mock()
     req.POST = {}
     req.body = "channel_name=ch&socket_id=s1"
     pusher.authenticate.return_value = {}
     pusher_authenticate(req)
     pusher.authenticate.assert_called_with(channel='ch', socket_id='s1')
예제 #3
0
 def test_auth_with_post(self, pusher):
     req = mock.Mock()
     req.POST = {
         'channel_name': 'ch',
         'socket_id': 's1'
     }
     pusher.authenticate.return_value = {}
     pusher_authenticate(req)
     pusher.authenticate.assert_called_with(channel='ch', socket_id='s1')
예제 #4
0
 def test_auth_with_post(self, pusher):
     req = mock.Mock()
     req.POST = {'channel_name': 'ch', 'socket_id': 's1'}
     pusher.authenticate.return_value = {}
     pusher_authenticate(req)
     pusher.authenticate.assert_called_with(channel='ch', socket_id='s1')