def test_default_resources():
    application = Application()
    with ManagedServerLoop(application) as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo/') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='foo/') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='foo') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo/bar') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/bar/')
        assert (r.path_versioner == StaticHandler.append_version)
def test_default_resources():
    application = Application()
    with ManagedServerLoop(application) as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == )
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo/') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='foo/') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='foo') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/')
        assert (r.path_versioner == StaticHandler.append_version)
    with ManagedServerLoop(application, prefix='/foo/bar') as server:
        r = server._tornado.resources()
        assert (r.mode == 'server')
        assert (r.root_url == '/foo/bar/')
        assert (r.path_versioner == StaticHandler.append_version)