summaryrefslogtreecommitdiff
path: root/tests/serializers/test_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/serializers/test_xml.py')
-rw-r--r--tests/serializers/test_xml.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/serializers/test_xml.py b/tests/serializers/test_xml.py
index bfa91559ff..5d8b9c04cc 100644
--- a/tests/serializers/test_xml.py
+++ b/tests/serializers/test_xml.py
@@ -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