Fix some regex DeprecationWarnings (#392)

This commit is contained in:
Simon Willison 2018-12-28 18:22:27 -08:00 committed by GitHub
commit a2bfcfc1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View file

@ -687,7 +687,7 @@ def test_allow_download_on(app_client):
"/fixtures"
)
soup = Soup(response.body, 'html.parser')
assert len(soup.findAll('a', {'href': re.compile('\.db$')}))
assert len(soup.findAll('a', {'href': re.compile(r'\.db$')}))
def test_allow_download_off():
@ -699,7 +699,7 @@ def test_allow_download_off():
)
soup = Soup(response.body, 'html.parser')
assert not len(soup.findAll('a', {'href': re.compile('\.db$')}))
assert not len(soup.findAll('a', {'href': re.compile(r'\.db$')}))
# Accessing URL directly should 403
response = client.get(
"/fixtures.db",