media/tools/constrained_network_server/cns_test.py
def testGetServerURL(self):
    """Test server URL is correct when using Cherrypy port."""
    cns_obj = cns.ConstrainedNetworkServer(self.DummyOptions(), None)

    self.assertEqual(cns_obj._GetServerURL('ab/xz.webm', port=1234, t=1),
                     'http://127.0.0.1:1234/ServeConstrained?f=ab/xz.webm&t=1')
Test server URL is correct when using Cherrypy port.
Test server URL is correct when using Cherrypy port.
Test server URL is correct when using Cherrypy port .
def testGetServerURL(self):
    cns_obj = cns.ConstrainedNetworkServer(self.DummyOptions(), None)
    self.assertEqual(cns_obj._GetServerURL('ab/xz.webm', port=1234, t=1),
                     'http://127.0.0.1:1234/ServeConstrained?f=ab/xz.webm&t=1')
def testGetServerURL ( self ) : cns_obj = cns . ConstrainedNetworkServer ( self . DummyOptions ( ) , None ) self . assertEqual ( cns_obj . _GetServerURL ( 'ab/xz.webm' , port = 1234 , t = 1 ) , 'http://127.0.0.1:1234/ServeConstrained?f=ab/xz.webm&t=1' )
Test server URL is correct when using Cherrypy port.
Test server URL is correct when using Cherrypy port .
"""Test server URL is correct when using Cherrypy port."""
self