Bump all test dependencies

This results in some new errors from flake8-bugbear:
```
B020: Loop control variable overrides iterable it iterates
```
I can't see an issue with the places that we do this, so have ignored
these warnings. If we keep getting these and they look fine, we can
create a global rule to ignore B020.
This commit is contained in:
Katie Smith
2022-04-06 11:35:14 +01:00
parent 0bec5e8f0a
commit b5fa270cd2
4 changed files with 11 additions and 11 deletions

View File

@@ -100,7 +100,7 @@ def get_user_number(service_id, notification_id):
def get_sms_thread(service_id, user_number):
for notification in sorted((
for notification in sorted(( # noqa: B020
notification_api_client.get_notifications_for_service(service_id,
to=user_number,
template_type='sms')['notifications'] +

View File

@@ -91,7 +91,7 @@ def edit_sms_provider_ratio():
def _get_versions_since_switchover(provider_id):
for version in sorted(
for version in sorted( # noqa: B020
provider_client.get_provider_versions(provider_id)['data'],
key=lambda version: version['updated_at'] or ''
):
@@ -109,7 +109,7 @@ def _chunk_versions_by_day(versions):
days = defaultdict(list)
for version in sorted(versions, key=lambda version: version['updated_at'] or '', reverse=True):
for version in sorted(versions, key=lambda version: version['updated_at'] or '', reverse=True): # noqa: B020
days[
format_date_numeric(version['updated_at'])
].append(version)

View File

@@ -1,15 +1,15 @@
-r requirements.txt
isort==5.10.1
pytest==7.0.1
pytest==7.1.1
pytest-env==0.6.2
pytest-mock==3.7.0
pytest-xdist==2.5.0
beautifulsoup4==4.10.0
freezegun==1.1.0
freezegun==1.2.0
flake8==4.0.1
flake8-bugbear==22.1.11
flake8-bugbear==22.3.23
flake8-print==4.0.0
moto==3.0.5
moto==3.1.4
requests-mock==1.9.3
# used for creating manifest file locally
jinja2-cli[yaml]==0.8.1
jinja2-cli[yaml]==0.8.2

View File

@@ -1288,7 +1288,7 @@ def test_choose_a_template_to_copy(
assert len(actual) == len(expected)
for actual, expected in zip(actual, expected):
for actual, expected in zip(actual, expected): # noqa: B020
assert normalize_spaces(actual.text) == expected
links = page.select('main nav a')
@@ -1354,7 +1354,7 @@ def test_choose_a_template_to_copy_when_user_has_one_service(
assert len(actual) == len(expected)
for actual, expected in zip(actual, expected):
for actual, expected in zip(actual, expected): # noqa: B020
assert normalize_spaces(actual.text) == expected
assert page.select('main nav a')[0]['href'] == url_for(
@@ -1437,7 +1437,7 @@ def test_choose_a_template_to_copy_from_folder_within_service(
assert len(actual) == len(expected)
for actual, expected in zip(actual, expected):
for actual, expected in zip(actual, expected): # noqa: B020
assert normalize_spaces(actual.text) == expected
links = page.select('main nav a')