diff --git a/aiohttp_devtools/start/template/requirements.txt b/aiohttp_devtools/start/template/requirements.txt index a14732a9..d345e59b 100644 --- a/aiohttp_devtools/start/template/requirements.txt +++ b/aiohttp_devtools/start/template/requirements.txt @@ -1,20 +1,20 @@ # {# This file is special: lines are made unique, stripped and sorted before the new requirements.txt file is created #} # you will need to install these requirements with `pip install -r requirements.txt` -aiohttp==3.0.1 -pytest==3.4.0 +aiohttp==3.2.1 +pytest==3.5.1 pytest-aiohttp==0.3.0 pytest-cov==2.5.1 # {% if template_engine.is_jinja %} -aiohttp-jinja2==0.15.0 +aiohttp-jinja2==1.0.0 # {% endif %} # {% if session.is_secure %} -aiohttp-session[secure]==2.2.0 +aiohttp-session[secure]==2.3.0 # {% endif %} # {% if database.is_pg_sqlalchemy %} aiopg==0.13.2 -SQLAlchemy==1.2.2 +SQLAlchemy==1.2.7 # {% endif %} diff --git a/tests/requirements.txt b/tests/requirements.txt index d3a2c985..36ee5195 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,23 +1,23 @@ -coverage==4.4.2 +coverage==4.5.1 docutils==0.14 flake8==3.5.0 -grablib==0.6.1 +grablib==0.6.1 # pyup: ignore (last version which is compatible with python 3.5) pycodestyle==2.3.1 pyflakes==1.6.0 -pytest==3.4.0 +pytest==3.5.1 pytest-aiohttp==0.3.0 pytest-cov==2.5.1 pytest-isort==0.1.0 -pytest-mock==1.6.3 +pytest-mock==1.9.0 pytest-sugar==0.9.1 pytest-timeout==1.2.1 -pytest-toolbox==0.2 -pytest-xdist==1.22.0 -Sphinx==1.6.6 +pytest-toolbox==0.4 +pytest-xdist==1.22.2 +Sphinx==1.7.4 # required to run "start" apps -aiohttp-jinja2==0.15.0 -aiohttp-session[secure]==2.2.0 -aiohttp-session[aioredis]==2.2.0 +aiohttp-jinja2==1.0.0 +aiohttp-session[secure]==2.3.0 +aiohttp-session[aioredis]==2.3.0 aiopg==0.13.2 -SQLAlchemy==1.2.2 +SQLAlchemy==1.2.7 diff --git a/tests/test_runserver_main.py b/tests/test_runserver_main.py index 3019e272..5b262793 100644 --- a/tests/test_runserver_main.py +++ b/tests/test_runserver_main.py @@ -39,7 +39,7 @@ async def check_server_running(loop, check_callback): @if_boxed @slow -def test_start_runserver(tmpworkdir, caplog): +def test_start_runserver(tmpworkdir, smart_caplog): mktree(tmpworkdir, { 'app.py': """\ from aiohttp import web @@ -86,7 +86,7 @@ async def check_callback(session): 'adev.server.dft INFO: Starting aux server at http://localhost:8001 ◆\n' 'adev.server.dft INFO: serving static files from ./static_dir/ at http://localhost:8001/static/\n' 'adev.server.dft INFO: Starting dev server at http://localhost:8000 ●\n' - ) in caplog + ) in smart_caplog @if_boxed @@ -220,7 +220,7 @@ def aux_cli(test_client, loop): loop.run_until_complete(cli.close()) -async def test_websocket_hello(aux_cli, caplog): +async def test_websocket_hello(aux_cli, smart_caplog): async with aux_cli.session.ws_connect(aux_cli.make_url('/livereload')) as ws: await ws.send_json({'command': 'hello', 'protocols': ['http://livereload.com/protocols/official-7']}) async for msg in ws: @@ -232,7 +232,7 @@ async def test_websocket_hello(aux_cli, caplog): 'protocols': ['http://livereload.com/protocols/official-7'] } break # noqa - assert 'adev.server.aux WARNING: browser disconnected, appears no websocket connection was made' in caplog + assert 'adev.server.aux WARNING: browser disconnected, appears no websocket connection was made' in smart_caplog async def test_websocket_info(aux_cli, loop): @@ -246,7 +246,7 @@ async def test_websocket_info(aux_cli, loop): await ws.close() -async def test_websocket_bad(aux_cli, caplog): +async def test_websocket_bad(aux_cli, smart_caplog): async with aux_cli.session.ws_connect(aux_cli.make_url('/livereload')) as ws: await ws.send_str('not json') async with aux_cli.session.ws_connect(aux_cli.make_url('/livereload')) as ws: @@ -255,10 +255,10 @@ async def test_websocket_bad(aux_cli, caplog): await ws.send_json({'command': 'boom', 'url': 'foobar', 'plugins': 'bang'}) async with aux_cli.session.ws_connect(aux_cli.make_url('/livereload')) as ws: await ws.send_bytes(b'this is bytes') - assert 'adev.server.aux ERROR: live reload protocol 7 not supported' in caplog.log - assert 'adev.server.aux ERROR: JSON decode error' in caplog.log - assert 'adev.server.aux ERROR: Unknown ws message' in caplog.log - assert "adev.server.aux ERROR: unknown websocket message type binary, data: b'this is bytes'" in caplog + assert 'adev.server.aux ERROR: live reload protocol 7 not supported' in smart_caplog.log + assert 'adev.server.aux ERROR: JSON decode error' in smart_caplog.log + assert 'adev.server.aux ERROR: Unknown ws message' in smart_caplog.log + assert "adev.server.aux ERROR: unknown websocket message type binary, data: b'this is bytes'" in smart_caplog async def test_websocket_reload(aux_cli, loop): diff --git a/tests/test_runserver_serve.py b/tests/test_runserver_serve.py index 2c7affc8..397e6aed 100644 --- a/tests/test_runserver_serve.py +++ b/tests/test_runserver_serve.py @@ -27,7 +27,7 @@ async def test_check_port_not_open(unused_port, loop): await check_port_open(port, loop, 0.001) -async def test_aux_reload(caplog): +async def test_aux_reload(smart_caplog): aux_app = Application() ws = MagicMock() ws.send_str = MagicMock(return_value=create_future()) @@ -45,7 +45,7 @@ async def test_aux_reload(caplog): 'liveCSS': True, 'liveImg': True, } - assert 'adev.server.aux INFO: prompted reload of /static/the_file.js on 1 client\n' == caplog + assert 'adev.server.aux INFO: prompted reload of /static/the_file.js on 1 client\n' == smart_caplog async def test_aux_reload_no_path(): @@ -81,7 +81,7 @@ async def test_aux_reload_html_different(): assert ws.send_str.call_count == 0 -async def test_aux_reload_runtime_error(caplog): +async def test_aux_reload_runtime_error(smart_caplog): aux_app = Application() ws = MagicMock() ws.send_str = MagicMock(return_value=create_future()) @@ -93,7 +93,7 @@ async def test_aux_reload_runtime_error(caplog): ) assert 0 == await src_reload(aux_app) assert ws.send_str.call_count == 1 - assert 'adev.server.aux ERROR: Error broadcasting change to /foo/bar, RuntimeError: foobar\n' == caplog + assert 'adev.server.aux ERROR: Error broadcasting change to /foo/bar, RuntimeError: foobar\n' == smart_caplog async def test_aux_cleanup(loop): diff --git a/tests/test_start.py b/tests/test_start.py index 95193c2c..ec24287d 100644 --- a/tests/test_start.py +++ b/tests/test_start.py @@ -19,7 +19,7 @@ if_boxed = get_if_boxed(pytest) -def test_start_simple(tmpdir, caplog): +def test_start_simple(tmpdir, smart_caplog): StartProject(path=str(tmpdir), name='foobar') assert {p.basename for p in tmpdir.listdir()} == { 'app', @@ -38,11 +38,11 @@ def test_start_simple(tmpdir, caplog): session: secure database: pg-sqlalchemy example: message-board -adev.main INFO: project created, 18 files generated\n""" == caplog(('"/tmp/.*?"', '"/tmp/..."')) +adev.main INFO: project created, 18 files generated\n""" == smart_caplog(('"/tmp/.*?"', '"/tmp/..."')) @if_boxed -async def test_start_other_dir(tmpdir, loop, test_client, caplog): +async def test_start_other_dir(tmpdir, loop, test_client, smart_caplog): StartProject(path=str(tmpdir.join('the-path')), name='foobar', database=DatabaseChoice.NONE) assert {p.basename for p in tmpdir.listdir()} == {'the-path'} assert {p.basename for p in tmpdir.join('the-path').listdir()} == { @@ -62,7 +62,7 @@ async def test_start_other_dir(tmpdir, loop, test_client, caplog): session: secure database: none example: message-board -adev.main INFO: project created, 16 files generated\n""" == caplog.log.replace(str(tmpdir), '/') +adev.main INFO: project created, 16 files generated\n""" == smart_caplog.log.replace(str(tmpdir), '/') config = Config(app_path='the-path/app/', root_path=str(tmpdir), static_path='.') app_factory = config.import_app_factory() app = app_factory()