changeset 6438:5edef8b14334

tests: replace yield_fixtures with plain fixtures yield_fixtures and fixtures are the same since pytest-3.0, but the name yield_fixture is now deprecated.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Thu, 25 Aug 2016 21:22:27 +0200
parents e2739d57f153
children 07644836640a
files kallithea/tests/conftest.py kallithea/tests/functional/test_admin_users.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/conftest.py	Thu Dec 22 13:19:23 2016 +0100
+++ b/kallithea/tests/conftest.py	Thu Aug 25 21:22:27 2016 +0200
@@ -30,7 +30,7 @@
     return pylons.test.pylonsapp
 
 
-@pytest.yield_fixture
+@pytest.fixture
 def create_test_user():
     """Provide users that automatically disappear after test is over."""
     test_user_ids = []
@@ -55,7 +55,7 @@
     session.commit()
 
 
-@pytest.yield_fixture
+@pytest.fixture
 def set_test_settings():
     """Restore settings after test is over."""
     # Save settings.
@@ -75,7 +75,7 @@
         Setting.create_or_update(k, v, t)
     session.commit()
 
-@pytest.yield_fixture
+@pytest.fixture
 def auto_clear_ip_permissions():
     """Fixture that provides nothing but clearing IP permissions upon test
     exit. This clearing is needed to avoid other test failing to make fake http
--- a/kallithea/tests/functional/test_admin_users.py	Thu Dec 22 13:19:23 2016 +0100
+++ b/kallithea/tests/functional/test_admin_users.py	Thu Aug 25 21:22:27 2016 +0200
@@ -29,7 +29,7 @@
 
 fixture = Fixture()
 
-@pytest.yield_fixture
+@pytest.fixture
 def user_and_repo_group_fail():
     username = 'repogrouperr'
     groupname = u'repogroup_fail'