summaryrefslogtreecommitdiff
path: root/tests/serializers/test_xml.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:27:04 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 19:25:02 +0100
commit3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch)
tree0c80b4868391296335580242c8e65052a4f62a6b /tests/serializers/test_xml.py
parent6a682b38e75d4c975b4c4493565a59f1bc14397c (diff)
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
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