11import django .template as django_template
22from django .template .engine import Engine
33from django .template .response import SimpleTemplateResponse
4- from django .urls import reverse
54from django .test import TestCase
5+ from django .urls import reverse
66
77from . import models
88
@@ -49,7 +49,7 @@ def setUp(self):
4949 models .SecretFile .objects .create (filename = "bar.txt" , order = 2 , size = 512 )
5050
5151 def test_sorting_nulls_first (self ):
52- """ Verify None sorted field_name is in firsts places when sorting in asc and desc order """
52+ """Verify None sorted field_name is in first places when sorting in asc and desc order"""
5353
5454 models .SecretFile .objects .create (filename = None , order = 3 , size = 512 )
5555 # asc order
@@ -69,7 +69,7 @@ def test_sorting_nulls_first(self):
6969 self .assertQuerysetEqual (list (response .context ["secret_files" ]), values )
7070
7171 def test_sorting_nulls_last (self ):
72- """ Verify None sorted field_name is in lasts places when sorting in asc and desc order """
72+ """Verify None sorted field_name is in last places when sorting in asc and desc order. """
7373
7474 models .SecretFile .objects .create (filename = None , order = 3 , size = 512 )
7575 # asc order
@@ -89,7 +89,7 @@ def test_sorting_nulls_last(self):
8989 self .assertQuerysetEqual (list (response .context ["secret_files" ]), values )
9090
9191 def test_sorting_nulls_first_and_last (self ):
92- """ Verify nulls_first and nulls_last autosort params can't be used at the same time """
92+ """Verify nulls_first and nulls_last autosort params can't be used at the same time"""
9393
9494 engine = Engine (
9595 libraries = {'sorting_tags' : 'webstack_django_sorting.templatetags.sorting_tags' },
@@ -100,7 +100,7 @@ def test_sorting_nulls_first_and_last(self):
100100 {% load sorting_tags %}
101101 {% autosort secret_files nulls_first=True nulls_last=True %}
102102 """ )
103- response = SimpleTemplateResponse (
103+ SimpleTemplateResponse (
104104 template ,
105105 context = {'secret_files' : models .SecretFile .objects .all ()}
106106 )
0 commit comments