From 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 4 Feb 2022 08:08:27 +0100 Subject: Refs #33476 -- Refactored code to strictly match 88 characters line length. --- tests/get_object_or_404/tests.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tests/get_object_or_404') diff --git a/tests/get_object_or_404/tests.py b/tests/get_object_or_404/tests.py index 5fdceaa04a..a64900d097 100644 --- a/tests/get_object_or_404/tests.py +++ b/tests/get_object_or_404/tests.py @@ -88,19 +88,28 @@ class GetObjectOr404Tests(TestCase): def test_bad_class(self): # Given an argument klass that is not a Model, Manager, or Queryset # raises a helpful ValueError message - msg = "First argument to get_object_or_404() must be a Model, Manager, or QuerySet, not 'str'." + msg = ( + "First argument to get_object_or_404() must be a Model, Manager, or " + "QuerySet, not 'str'." + ) with self.assertRaisesMessage(ValueError, msg): get_object_or_404("Article", title__icontains="Run") class CustomClass: pass - msg = "First argument to get_object_or_404() must be a Model, Manager, or QuerySet, not 'CustomClass'." + msg = ( + "First argument to get_object_or_404() must be a Model, Manager, or " + "QuerySet, not 'CustomClass'." + ) with self.assertRaisesMessage(ValueError, msg): get_object_or_404(CustomClass, title__icontains="Run") # Works for lists too - msg = "First argument to get_list_or_404() must be a Model, Manager, or QuerySet, not 'list'." + msg = ( + "First argument to get_list_or_404() must be a Model, Manager, or " + "QuerySet, not 'list'." + ) with self.assertRaisesMessage(ValueError, msg): get_list_or_404([Article], title__icontains="Run") -- cgit v1.3