示例#1
0
    def test_info_entropy(self):
        route = self.make_route()
        request = self.make_request('GET', '/sm/')

        response = route.info(request)
        entropy1 = protocol.loads(response.body.decode('utf-8'))['entropy']

        response = route.info(request)
        entropy2 = protocol.loads(response.body.decode('utf-8'))['entropy']

        self.assertFalse(entropy1 == entropy2)
示例#2
0
    def test_info(self):
        route = self.make_route()
        request = self.make_request('GET', '/sm/')

        response = route.info(request)
        info = protocol.loads(response.body.decode('utf-8'))

        self.assertTrue(info['websocket'])
        self.assertTrue(info['cookie_needed'])