mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:45:03 -04:00
Run Black on the tests again (#5170)
This commit is contained in:
parent
d9a02d1201
commit
b36c82576e
54 changed files with 818 additions and 1158 deletions
|
@ -26,20 +26,14 @@ class GetFileNameFromHeadersTests(unittest.TestCase):
|
|||
b'inline; filename="aze%20rty"': u"aze%20rty",
|
||||
b'inline; filename="aze\"rty"': u'aze"rty',
|
||||
b'inline; filename="azer;ty"': u"azer;ty",
|
||||
|
||||
b"inline; filename*=utf-8''foo%C2%A3bar": u"foo£bar",
|
||||
}
|
||||
|
||||
def tests(self):
|
||||
for hdr, expected in self.TEST_CASES.items():
|
||||
res = get_filename_from_headers(
|
||||
{
|
||||
b'Content-Disposition': [hdr],
|
||||
},
|
||||
)
|
||||
res = get_filename_from_headers({b'Content-Disposition': [hdr]})
|
||||
self.assertEqual(
|
||||
res, expected,
|
||||
"expected output for %s to be %s but was %s" % (
|
||||
hdr, expected, res,
|
||||
)
|
||||
res,
|
||||
expected,
|
||||
"expected output for %s to be %s but was %s" % (hdr, expected, res),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue