diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-04 08:08:27 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch) | |
tree | fa50869f5614295f462d9bf77fec59365c621609 /tests/serializers | |
parent | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff) | |
download | django-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz |
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/serializers')
-rw-r--r-- | tests/serializers/test_xml.py | 7 | ||||
-rw-r--r-- | tests/serializers/tests.py | 5 |
2 files changed, 9 insertions, 3 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 diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py index 8778d6f7da..d995b36e04 100644 --- a/tests/serializers/tests.py +++ b/tests/serializers/tests.py @@ -54,7 +54,10 @@ class SerializerRegistrationTests(SimpleTestCase): self.assertIn("xml", public_formats) def test_unregister(self): - "Unregistering a serializer doesn't cause the registry to be repopulated. Refs #14823" + """ + Unregistering a serializer doesn't cause the registry to be + repopulated. + """ serializers.unregister_serializer("xml") serializers.register_serializer("json3", "django.core.serializers.json") |