@@ -21,7 +21,7 @@ def test_included_data_on_list(multiple_entries, client):
21
21
comment_count = len (
22
22
[resource for resource in included if resource ["type" ] == "comments" ]
23
23
)
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 )
25
25
assert comment_count == expected_comment_count , "List comment count is incorrect"
26
26
27
27
@@ -135,28 +135,24 @@ def test_deep_included_data_on_list(multiple_entries, client):
135
135
comment_count = len (
136
136
[resource for resource in included if resource ["type" ] == "comments" ]
137
137
)
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 )
139
139
assert comment_count == expected_comment_count , "List comment count is incorrect"
140
140
141
141
author_count = len (
142
142
[resource for resource in included if resource ["type" ] == "authors" ]
143
143
)
144
144
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
149
147
)
150
148
assert author_count == expected_author_count , "List author count is incorrect"
151
149
152
150
author_bio_count = len (
153
151
[resource for resource in included if resource ["type" ] == "authorBios" ]
154
152
)
155
153
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
160
156
)
161
157
assert (
162
158
author_bio_count == expected_author_bio_count
@@ -166,10 +162,8 @@ def test_deep_included_data_on_list(multiple_entries, client):
166
162
[resource for resource in included if resource ["type" ] == "writers" ]
167
163
)
168
164
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
173
167
)
174
168
assert writer_count == expected_writer_count , "List writer count is incorrect"
175
169
0 commit comments