@@ -21,7 +21,7 @@ def test_included_data_on_list(multiple_entries, client):
2121 comment_count = len (
2222 [resource for resource in included if resource ["type" ] == "comments" ]
2323 )
24- expected_comment_count = sum ([ entry .comments .count () for entry in multiple_entries ] )
24+ expected_comment_count = sum (entry .comments .count () for entry in multiple_entries )
2525 assert comment_count == expected_comment_count , "List comment count is incorrect"
2626
2727
@@ -135,28 +135,24 @@ def test_deep_included_data_on_list(multiple_entries, client):
135135 comment_count = len (
136136 [resource for resource in included if resource ["type" ] == "comments" ]
137137 )
138- expected_comment_count = sum ([ entry .comments .count () for entry in multiple_entries ] )
138+ expected_comment_count = sum (entry .comments .count () for entry in multiple_entries )
139139 assert comment_count == expected_comment_count , "List comment count is incorrect"
140140
141141 author_count = len (
142142 [resource for resource in included if resource ["type" ] == "authors" ]
143143 )
144144 expected_author_count = sum (
145- [
146- entry .comments .filter (author__isnull = False ).count ()
147- for entry in multiple_entries
148- ]
145+ entry .comments .filter (author__isnull = False ).count ()
146+ for entry in multiple_entries
149147 )
150148 assert author_count == expected_author_count , "List author count is incorrect"
151149
152150 author_bio_count = len (
153151 [resource for resource in included if resource ["type" ] == "authorBios" ]
154152 )
155153 expected_author_bio_count = sum (
156- [
157- entry .comments .filter (author__bio__isnull = False ).count ()
158- for entry in multiple_entries
159- ]
154+ entry .comments .filter (author__bio__isnull = False ).count ()
155+ for entry in multiple_entries
160156 )
161157 assert (
162158 author_bio_count == expected_author_bio_count
@@ -166,10 +162,8 @@ def test_deep_included_data_on_list(multiple_entries, client):
166162 [resource for resource in included if resource ["type" ] == "writers" ]
167163 )
168164 expected_writer_count = sum (
169- [
170- entry .comments .filter (author__isnull = False ).count ()
171- for entry in multiple_entries
172- ]
165+ entry .comments .filter (author__isnull = False ).count ()
166+ for entry in multiple_entries
173167 )
174168 assert writer_count == expected_writer_count , "List writer count is incorrect"
175169
0 commit comments