'Find the WS url, create an InfoSet and if others are found then add
the knowledge to the existing InfoSet. Avoids multiple reports of the
same WS url.'

def test_static_link_group_by_ws_url(self, *args):

    body = 'header<script>ws    =    new    WebSocket("ws://www.example.com:8080/socketserver");</script>footer'
    url = URL('https://www.w3af.com/1')
    headers = Headers([('content-type', 'text/html')])
    response = HTTPResponse(200, body, headers, url, url, _id=1)
    request = FuzzableRequest(url, method='GET')
    self.plugin.grep(request, response)
    url = URL('https://www.w3af.com/2')
    headers = Headers([('content-type', 'text/html')])
    response = HTTPResponse(200, body, headers, url, url, _id=2)
    request = FuzzableRequest(url, method='GET')
    self.plugin.grep(request, response)
    ws_info_sets = kb.kb.get('websockets_links', 'websockets_links')
    self.assertEqual(len(ws_info_sets), 1)
    info_set = ws_info_sets[0]
    expected_desc = u'The    application    uses    the    HTML5    WebSocket    URL    "ws://www.example.com:8080/socketserver"    in    2    different    URLs.    The    first    ten    URLs    are:\n    -    https://www.w3af.com/1\n    -    https://www.w3af.com/2\n'
    self.assertEqual(len(info_set.infos), 2)
    self.assertEqual(info_set.get_id(), [1, 2])
    self.assertEqual(info_set.get_desc(), expected_desc)
