media/tools/constrained_network_server/cns_test.py
def testGetServerURLWithLocalServer(self):
    """Test server URL is correct when using --local-server-port port."""
    cns_obj = cns.ConstrainedNetworkServer(self.DummyOptionsWithServer(), None)

    self.assertEqual(cns_obj._GetServerURL('ab/xz.webm', port=1234, t=1),
                     'http://127.0.0.1:1234/media/ab/xz.webm?t=1')
Test server URL is correct when using --local-server-port port.
Test server URL is correct when using --local-server-port port.
Test server URL is correct when using -- local - server - port port .
def testGetServerURLWithLocalServer(self):
    cns_obj = cns.ConstrainedNetworkServer(self.DummyOptionsWithServer(), None)
    self.assertEqual(cns_obj._GetServerURL('ab/xz.webm', port=1234, t=1),
                     'http://127.0.0.1:1234/media/ab/xz.webm?t=1')
def testGetServerURLWithLocalServer ( self ) : cns_obj = cns . ConstrainedNetworkServer ( self . DummyOptionsWithServer ( ) , None ) self . assertEqual ( cns_obj . _GetServerURL ( 'ab/xz.webm' , port = 1234 , t = 1 ) , 'http://127.0.0.1:1234/media/ab/xz.webm?t=1' )
Test server URL is correct when using --local-server-port port.
Test server URL is correct when using -- local - server - port port .
"""Test server URL is correct when using --local-server-port port."""
self