mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 01:33:13 -04:00
Bump jsonschema from 3.2.0 to 4.4.0
The big breaking change for our code (not mentioned in the changelog) is that the built-in validator for the `date-time` format now requires the `rfc3339-validator` package instead of the `strict-rfc3339` package. This updates the requirements file to use `rfc3339-validator`. Without this change, wrong `date-time` formats would always silently pass validation.
This commit is contained in:
@@ -6,5 +6,5 @@ post_letter_branding_schema = {
|
|||||||
"name": {"type": ["string", "null"]},
|
"name": {"type": ["string", "null"]},
|
||||||
"filename": {"type": ["string", "null"]},
|
"filename": {"type": ["string", "null"]},
|
||||||
},
|
},
|
||||||
"required": ("name", "filename")
|
"required": ["name", "filename"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ click-datetime==0.2
|
|||||||
git+https://github.com/benoitc/gunicorn.git@1299ea9e967a61ae2edebe191082fd169b864c64#egg=gunicorn[eventlet]==20.1.0
|
git+https://github.com/benoitc/gunicorn.git@1299ea9e967a61ae2edebe191082fd169b864c64#egg=gunicorn[eventlet]==20.1.0
|
||||||
iso8601==1.0.2
|
iso8601==1.0.2
|
||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
jsonschema==3.2.0
|
jsonschema==4.4.0
|
||||||
marshmallow-sqlalchemy==0.23.1 # pyup: <0.24.0 # marshmallow v3 throws errors
|
marshmallow-sqlalchemy==0.23.1 # pyup: <0.24.0 # marshmallow v3 throws errors
|
||||||
marshmallow==2.21.0 # pyup: <3 # v3 throws errors
|
marshmallow==2.21.0 # pyup: <3 # v3 throws errors
|
||||||
psycopg2-binary==2.9.3
|
psycopg2-binary==2.9.3
|
||||||
PyJWT==2.3.0
|
PyJWT==2.3.0
|
||||||
SQLAlchemy==1.4.35
|
SQLAlchemy==1.4.35
|
||||||
strict-rfc3339==0.7
|
rfc3339-validator==0.1.4
|
||||||
rfc3987==1.3.8
|
rfc3987==1.3.8
|
||||||
cachetools==5.0.0
|
cachetools==5.0.0
|
||||||
beautifulsoup4==4.10.0
|
beautifulsoup4==4.10.0
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ jmespath==0.10.0
|
|||||||
# via
|
# via
|
||||||
# boto3
|
# boto3
|
||||||
# botocore
|
# botocore
|
||||||
jsonschema==3.2.0
|
jsonschema==4.4.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
kombu==5.2.3
|
kombu==5.2.3
|
||||||
# via celery
|
# via celery
|
||||||
@@ -200,6 +200,8 @@ requests==2.26.0
|
|||||||
# govuk-bank-holidays
|
# govuk-bank-holidays
|
||||||
# notifications-python-client
|
# notifications-python-client
|
||||||
# notifications-utils
|
# notifications-utils
|
||||||
|
rfc3339-validator==0.1.4
|
||||||
|
# via -r requirements.in
|
||||||
rfc3987==1.3.8
|
rfc3987==1.3.8
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
rsa==4.7.2
|
rsa==4.7.2
|
||||||
@@ -218,8 +220,8 @@ six==1.16.0
|
|||||||
# click-repl
|
# click-repl
|
||||||
# eventlet
|
# eventlet
|
||||||
# flask-marshmallow
|
# flask-marshmallow
|
||||||
# jsonschema
|
|
||||||
# python-dateutil
|
# python-dateutil
|
||||||
|
# rfc3339-validator
|
||||||
smartypants==2.0.1
|
smartypants==2.0.1
|
||||||
# via notifications-utils
|
# via notifications-utils
|
||||||
soupsieve==2.2.1
|
soupsieve==2.2.1
|
||||||
@@ -231,8 +233,6 @@ sqlalchemy==1.4.35
|
|||||||
# marshmallow-sqlalchemy
|
# marshmallow-sqlalchemy
|
||||||
statsd==3.3.0
|
statsd==3.3.0
|
||||||
# via notifications-utils
|
# via notifications-utils
|
||||||
strict-rfc3339==0.7
|
|
||||||
# via -r requirements.in
|
|
||||||
urllib3==1.26.7
|
urllib3==1.26.7
|
||||||
# via
|
# via
|
||||||
# botocore
|
# botocore
|
||||||
|
|||||||
@@ -87,5 +87,4 @@ def test_get_complaint_with_invalid_data_returns_400_status_code(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 400
|
assert response.status_code == 400
|
||||||
assert response.json['errors'][0]['message'] == 'start_date time data {} does not match format %Y-%m-%d'.format(
|
assert response.json['errors'][0]['message'] == 'start_date month must be in 1..12'
|
||||||
start_date)
|
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ def test_get_platform_stats_validates_the_date(admin_request):
|
|||||||
_expected_status=400
|
_expected_status=400
|
||||||
)
|
)
|
||||||
|
|
||||||
assert response['errors'][0]['message'] == 'start_date time data {} does not match format %Y-%m-%d'.format(
|
assert response['errors'][0]['message'] == 'start_date month must be in 1..12'
|
||||||
start_date)
|
|
||||||
|
|
||||||
|
|
||||||
@freeze_time('2018-10-31 14:00')
|
@freeze_time('2018-10-31 14:00')
|
||||||
|
|||||||
Reference in New Issue
Block a user