File tree 1 file changed +4
-2
lines changed
example/tests/integration
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def test_included_data_on_list(multiple_entries, client):
11
11
included = load_json (response .content ).get ('included' )
12
12
13
13
assert len (load_json (response .content )['data' ]) == len (multiple_entries ), 'Incorrect entry count'
14
- assert [x .get ('type' ) for x in included ] == ['comments' ], 'List included types are incorrect'
14
+ assert [x .get ('type' ) for x in included ] == ['comments' , 'comments' ], 'List included types are incorrect'
15
15
16
16
comment_count = len ([resource for resource in included if resource ["type" ] == "comments" ])
17
17
expected_comment_count = sum ([entry .comment_set .count () for entry in multiple_entries ])
@@ -23,5 +23,7 @@ def test_included_data_on_detail(single_entry, client):
23
23
included = load_json (response .content ).get ('included' )
24
24
25
25
assert [x .get ('type' ) for x in included ] == ['comments' ], 'Detail included types are incorrect'
26
+
26
27
comment_count = len ([resource for resource in included if resource ["type" ] == "comments" ])
27
- assert comment_count == single_entry .comment_set .count (), 'Detail comment count is incorrect'
28
+ expected_comment_count = single_entry .comment_set .count ()
29
+ assert comment_count == expected_comment_count , 'Detail comment count is incorrect'
You can’t perform that action at this time.
0 commit comments