Skip to content

Commit 3cf26c8

Browse files
committed
Fixed failing tests
1 parent dcb9b9e commit 3cf26c8

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

example/tests/integration/test_non_paginated_responses.py

+50
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
3535
"blog": {
3636
"data": {"type": "blogs", "id": "1"}
3737
},
38+
"blogHyperlinked": {
39+
"links": {
40+
"related": "http://testserver/entries/1/blog",
41+
"self": "http://testserver/entries/1/relationships/blog_hyperlinked"
42+
}
43+
},
3844
"authors": {
3945
"meta": {"count": 1},
4046
"data": [{"type": "authors", "id": "1"}]
@@ -43,13 +49,32 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
4349
"meta": {"count": 1},
4450
"data": [{"type": "comments", "id": "1"}]
4551
},
52+
"commentsHyperlinked": {
53+
"links": {
54+
"related": "http://testserver/entries/1/comments",
55+
"self": "http://testserver/entries/1/relationships/comments_hyperlinked"
56+
}
57+
},
4658
"suggested": {
4759
"data": [{"type": "entries", "id": "2"}],
4860
"links": {
4961
"related": "http://testserver/entries/1/suggested/",
5062
"self": "http://testserver/entries/1/relationships/suggested"
5163
}
5264
},
65+
"suggestedHyperlinked": {
66+
"links": {
67+
"related": "http://testserver/entries/1/suggested/",
68+
"self": "http://testserver/entries/1"
69+
"/relationships/suggested_hyperlinked"
70+
}
71+
},
72+
"featuredHyperlinked": {
73+
"links": {
74+
"related": "http://testserver/entries/1/featured",
75+
"self": "http://testserver/entries/1/relationships/featured_hyperlinked"
76+
}
77+
},
5378
"tags": {
5479
"data": []
5580
}
@@ -73,6 +98,12 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
7398
"blog": {
7499
"data": {"type": "blogs", "id": "2"}
75100
},
101+
"blogHyperlinked": {
102+
"links": {
103+
"related": "http://testserver/entries/2/blog",
104+
"self": "http://testserver/entries/2/relationships/blog_hyperlinked",
105+
}
106+
},
76107
"authors": {
77108
"meta": {"count": 1},
78109
"data": [{"type": "authors", "id": "2"}]
@@ -81,13 +112,32 @@ def test_multiple_entries_no_pagination(multiple_entries, client):
81112
"meta": {"count": 1},
82113
"data": [{"type": "comments", "id": "2"}]
83114
},
115+
"commentsHyperlinked": {
116+
"links": {
117+
"related": "http://testserver/entries/2/comments",
118+
"self": "http://testserver/entries/2/relationships/comments_hyperlinked"
119+
}
120+
},
84121
"suggested": {
85122
"data": [{"type": "entries", "id": "1"}],
86123
"links": {
87124
"related": "http://testserver/entries/2/suggested/",
88125
"self": "http://testserver/entries/2/relationships/suggested"
89126
}
90127
},
128+
"suggestedHyperlinked": {
129+
"links": {
130+
"related": "http://testserver/entries/2/suggested/",
131+
"self": "http://testserver/entries/2"
132+
"/relationships/suggested_hyperlinked"
133+
}
134+
},
135+
"featuredHyperlinked": {
136+
"links": {
137+
"related": "http://testserver/entries/2/featured",
138+
"self": "http://testserver/entries/2/relationships/featured_hyperlinked"
139+
}
140+
},
91141
"tags": {
92142
"data": []
93143
}

example/tests/integration/test_pagination.py

+25
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ def test_pagination_with_single_entry(single_entry, client):
3636
"blog": {
3737
"data": {"type": "blogs", "id": "1"}
3838
},
39+
"blogHyperlinked": {
40+
"links": {
41+
"related": "http://testserver/entries/1/blog",
42+
"self": "http://testserver/entries/1/relationships/blog_hyperlinked",
43+
}
44+
},
3945
"authors": {
4046
"meta": {"count": 1},
4147
"data": [{"type": "authors", "id": "1"}]
@@ -44,13 +50,32 @@ def test_pagination_with_single_entry(single_entry, client):
4450
"meta": {"count": 1},
4551
"data": [{"type": "comments", "id": "1"}]
4652
},
53+
"commentsHyperlinked": {
54+
"links": {
55+
"related": "http://testserver/entries/1/comments",
56+
"self": "http://testserver/entries/1/relationships/comments_hyperlinked"
57+
}
58+
},
4759
"suggested": {
4860
"data": [],
4961
"links": {
5062
"related": "http://testserver/entries/1/suggested/",
5163
"self": "http://testserver/entries/1/relationships/suggested"
5264
}
5365
},
66+
"suggestedHyperlinked": {
67+
"links": {
68+
"related": "http://testserver/entries/1/suggested/",
69+
"self": "http://testserver/entries/1"
70+
"/relationships/suggested_hyperlinked"
71+
}
72+
},
73+
"featuredHyperlinked": {
74+
"links": {
75+
"related": "http://testserver/entries/1/featured",
76+
"self": "http://testserver/entries/1/relationships/featured_hyperlinked"
77+
}
78+
},
5479
"tags": {
5580
"data": [
5681
{

0 commit comments

Comments
 (0)