update test requirements

requirements should be kept up to date to ensure we get bug fixes and new features as they come - particularly py.test, which we were running an 18 month old version for, and missing out on some useful xfail and fixture enhancements, among other things
This commit is contained in:
Leo Hemsted
2016-08-30 10:41:23 +01:00
parent 4f0c5fdd9e
commit fa3d4413e7
2 changed files with 14 additions and 9 deletions

View File

@@ -1,11 +1,10 @@
-r requirements.txt -r requirements.txt
pep8==1.5.7 pep8==1.7.0
pytest==2.8.3 pytest==3.0.1
pytest-mock==0.8.1 pytest-mock==1.2
pytest-cov==2.2.0 pytest-cov==2.3.1
coveralls==1.1 coveralls==1.1
mock==1.0.1 moto==0.4.25
moto==0.4.19 flex==5.8.0
flex==5.7.0 freezegun==0.3.7
freezegun==0.3.6 requests-mock==1.0.0
requests-mock==0.7.0

View File

@@ -24,6 +24,12 @@ def notify_api(request):
return app return app
@pytest.yield_fixture(scope='function')
def client(notify_api):
with notify_api.test_request_context(), notify_api.test_client() as client:
yield client
@pytest.fixture(scope='session') @pytest.fixture(scope='session')
def notify_db(notify_api, request): def notify_db(notify_api, request):
Migrate(notify_api, db) Migrate(notify_api, db)