mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Update beautifulsoup4 to 4.11.1
`charset-normalizer` is now used by default if installed instead of `chardet` (https://pyup.io/changelogs/beautifulsoup4/#4.11.0). We do have `charset-normalizer` installed because it's a subdependency of the requests library, so it is being used. This caused the `test_content_too_long_returns_400` to fail since it now thought that the encoding of `ŵ` is `{'encoding': 'Big5', 'language': 'Chinese', 'confidence': 1.0}`. There are two options for fixing this - change the test content so that it doesn't just contain a single letter - the docs state that you shouldn't run character detection on very tiny content - add `chardet` as a requirement, so that the code functions exactly the same as before I've chose the first option, since this avoids adding a dependency and we should never have messages consisting of a single character.
This commit is contained in:
@@ -248,5 +248,5 @@ WINDEMERE = """
|
||||
"""
|
||||
|
||||
LONG_GSM7 = WITH_PLACEHOLDER_FOR_CONTENT.format('a' * 1396)
|
||||
LONG_UCS2 = WITH_PLACEHOLDER_FOR_CONTENT.format('ŵ' * 616)
|
||||
LONG_UCS2 = WITH_PLACEHOLDER_FOR_CONTENT.format('ŵyl' * 205 + 'a')
|
||||
MISSING_AREA_NAMES = re.sub("<areaDesc>.*</areaDesc>", "<areaDesc> </areaDesc>", WAINFLEET)
|
||||
|
||||
Reference in New Issue
Block a user