mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #33476 -- Refactored code to strictly match 88 characters line length.
This commit is contained in:
@@ -82,7 +82,10 @@ class XmlSerializerTestCase(SerializersTestBase, TestCase):
|
||||
This is the most straightforward way to prevent all entity definitions
|
||||
and avoid both external entities and entity-expansion attacks.
|
||||
"""
|
||||
xml = '<?xml version="1.0" standalone="no"?><!DOCTYPE example SYSTEM "http://example.com/example.dtd">'
|
||||
xml = (
|
||||
'<?xml version="1.0" standalone="no"?>'
|
||||
'<!DOCTYPE example SYSTEM "http://example.com/example.dtd">'
|
||||
)
|
||||
with self.assertRaises(DTDForbidden):
|
||||
next(serializers.deserialize("xml", xml))
|
||||
|
||||
@@ -107,4 +110,4 @@ class XmlSerializerTransactionTestCase(
|
||||
</object>
|
||||
<object pk="1" model="serializers.category">
|
||||
<field type="CharField" name="name">Reference</field></object>
|
||||
</django-objects>"""
|
||||
</django-objects>""" # NOQA
|
||||
|
||||
Reference in New Issue
Block a user