File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
example/tests/integration Expand file tree Collapse file tree 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):
1111 included = load_json (response .content ).get ('included' )
1212
1313 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'
1515
1616 comment_count = len ([resource for resource in included if resource ["type" ] == "comments" ])
1717 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):
2323 included = load_json (response .content ).get ('included' )
2424
2525 assert [x .get ('type' ) for x in included ] == ['comments' ], 'Detail included types are incorrect'
26+
2627 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