#NEWLINE# def test_parse_absolute_uri( self ) : #NEWLINE# #INDENT# ( host , port , resource ) = http_header_util . parse_uri ( 'ws://localhost:10080/ws/test' ) #NEWLINE# self . assertEqual ( 'localhost' , host ) #NEWLINE# self . assertEqual ( 10080 , port ) #NEWLINE# self . assertEqual ( '/ws/test' , resource ) #NEWLINE# ( host , port , resource ) = http_header_util . parse_uri ( 'ws://example.com/ws/test' ) #NEWLINE# self . assertEqual ( 'example.com' , host ) #NEWLINE# self . assertEqual ( 80 , port ) #NEWLINE# self . assertEqual ( '/ws/test' , resource ) #NEWLINE# ( host , port , resource ) = http_header_util . parse_uri ( 'wss://example.com/' ) #NEWLINE# self . assertEqual ( 'example.com' , host ) #NEWLINE# self . assertEqual ( 443 , port ) #NEWLINE# self . assertEqual ( '/' , self ) #NEWLINE# ( host , port , resource ) = http_header_util . parse_uri ( 'ws://example.com:8080' ) #NEWLINE# self . assertEqual ( 'example.com' , host ) #NEWLINE# self . assertEqual ( 8080 , port ) #NEWLINE# self . assertEqual ( '/' , resource )