We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2fda91 commit 6178390Copy full SHA for 6178390
example/tests/integration/test_includes.py
@@ -0,0 +1,18 @@
1
+import pytest, json
2
+from django.core.urlresolvers import reverse
3
+
4
+pytestmark = pytest.mark.django_db
5
6
7
+def test_included_data_on_list(single_entry, client):
8
+ response = client.get(reverse("entry-list") + '?include=comments')
9
+ included = json.loads(response.content).get('included')
10
11
+ assert [x.get('type') for x in included] == ['comments']
12
13
+def test_included_data_on_detail(single_entry, client):
14
+ response = client.get(reverse("entry-detail", kwargs={'pk': single_entry.pk}) + '?include=comments')
15
16
17
18
0 commit comments