Stop using logged_in_client_with_session fixture

We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object

A few of our tests still use an older fixture called
`logged_in_client_with_session`. It’s not clear how this is different
from `logged_in_client`, which we have replaced with `client_request`.

So this commit goes ahead and converts all the tests using
`logged_in_client_with_session` to use `client_request` instead.
This commit is contained in:
Chris Hill-Scott
2022-01-04 19:04:45 +00:00
parent 0706664be4
commit c37258fd0d
2 changed files with 20 additions and 35 deletions

View File

@@ -1139,13 +1139,6 @@ def active_user_approve_broadcasts_permission():
return create_active_user_approve_broadcasts_permissions()
@pytest.fixture(scope='function')
def active_user_with_session(fake_uuid):
return create_service_one_admin(
id=fake_uuid,
)
@pytest.fixture(scope='function')
def active_user_with_permission_to_two_services(fake_uuid):
permissions = [
@@ -2756,18 +2749,6 @@ def _logged_in_client(
yield client
@pytest.fixture(scope='function')
def logged_in_client_with_session(
client,
active_user_with_session,
mocker,
service_one,
mock_login
):
client.login(active_user_with_session, mocker, service_one)
yield client
@pytest.fixture
def os_environ():
"""