Changeset - 5edef8b14334
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 9 years ago 2016-08-25 21:22:27
thomas.de.schampheleire@gmail.com
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.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/conftest.py
Show inline comments
 
@@ -30,7 +30,7 @@ def pytest_configure():
 
    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 @@ def _set_settings(*kvtseq):
 
    session.commit()
 

	
 

	
 
@pytest.yield_fixture
 
@pytest.fixture
 
def set_test_settings():
 
    """Restore settings after test is over."""
 
    # Save settings.
 
@@ -75,7 +75,7 @@ def set_test_settings():
 
        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
kallithea/tests/functional/test_admin_users.py
Show inline comments
 
@@ -29,7 +29,7 @@ from webob.exc import HTTPNotFound
 

	
 
fixture = Fixture()
 

	
 
@pytest.yield_fixture
 
@pytest.fixture
 
def user_and_repo_group_fail():
 
    username = 'repogrouperr'
 
    groupname = u'repogroup_fail'
0 comments (0 inline, 0 general)