Exemplo n.º 1
0
def test_get_admin(loop):
    app = web.Application(loop=loop)
    resources = tuple()
    admin = aiohttp_admin.setup(app, './', resources=resources)

    fetched_admin = aiohttp_admin.get_admin(app)
    assert admin is fetched_admin
Exemplo n.º 2
0
def test_get_admin_with_app_key(loop):
    app = web.Application(loop=loop)
    app_key = 'other_place'
    admin = aiohttp_admin.setup(app, './', app_key=app_key)

    fetched_admin = aiohttp_admin.get_admin(app, app_key=app_key)
    assert admin is fetched_admin
Exemplo n.º 3
0
def test_get_admin_with_app_key(loop):
    app = web.Application(loop=loop)
    app_key = 'other_place'
    admin = aiohttp_admin.setup(app, './', app_key=app_key)

    fetched_admin = aiohttp_admin.get_admin(app, app_key=app_key)
    assert admin is fetched_admin
Exemplo n.º 4
0
def test_get_admin(loop):
    app = web.Application(loop=loop)
    admin = aiohttp_admin.setup(app, './')

    fetched_admin = aiohttp_admin.get_admin(app)
    assert admin is fetched_admin
Exemplo n.º 5
0
def test_get_admin(loop):
    app = web.Application(loop=loop)
    admin = aiohttp_admin.setup(app, './')

    fetched_admin = aiohttp_admin.get_admin(app)
    assert admin is fetched_admin