apirunner 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,88 @@
1
+ ---
2
+ - name: "One putted series rating should be createable with 204 response"
3
+ request:
4
+ headers:
5
+ Content-Type: 'application/json'
6
+ path: '/users/duffyduck/ratings'
7
+ method: 'PUT'
8
+ body:
9
+ s50: 1.0
10
+ response_expectation:
11
+ status_code: 204
12
+ body:
13
+ - name: "There should be exactly one series rating in that profile"
14
+ request:
15
+ headers:
16
+ Content-Type: 'application/json'
17
+ path: '/users/duffyduck'
18
+ method: 'GET'
19
+ response_expectation:
20
+ status_code: 200
21
+ body:
22
+ ratings:
23
+ s50: 1.0
24
+ - name: "5 putted series ratings should be createable with 204 response"
25
+ request:
26
+ headers:
27
+ Content-Type: 'application/json'
28
+ path: '/users/duffyduck/ratings'
29
+ method: 'PUT'
30
+ body:
31
+ s69: 1.0
32
+ s70: 2.0
33
+ s71: 3.0
34
+ s86: 4.0
35
+ s87: 5.0
36
+ response_expectation:
37
+ status_code: 204
38
+ body:
39
+ - name: "There should be exactly 5 series ratings in that profile"
40
+ request:
41
+ headers:
42
+ Content-Type: 'application/json'
43
+ path: '/users/duffyduck'
44
+ method: 'GET'
45
+ response_expectation:
46
+ status_code: 200
47
+ body:
48
+ ratings:
49
+ s69: 1.0
50
+ s70: 2.0
51
+ s71: 3.0
52
+ s86: 4.0
53
+ s87: 5.0
54
+ - name: "It should return a 404 in case series ratings for a non existant user are put"
55
+ request:
56
+ headers:
57
+ Content-Type: 'application/json'
58
+ path: '/users/daisyduck/ratings'
59
+ method: 'PUT'
60
+ body:
61
+ s99: 1.0
62
+ s100: 2.0
63
+ response_expectation:
64
+ status_code: 404
65
+ - name: "It should return a 409 in case series ratings are put with ambigous moviemaster_id"
66
+ request:
67
+ headers:
68
+ Content-Type: 'application/json'
69
+ path: '/users/duffyduck/ratings'
70
+ method: 'PUT'
71
+ body:
72
+ s765000000000000: 1.0
73
+ s420000000000000: 2.0
74
+ response_expectation:
75
+ status_code: 409
76
+ body:
77
+ - name: "It should return a 409 in case series ratings are put with ambigous ratings values"
78
+ request:
79
+ headers:
80
+ Content-Type: 'application/json'
81
+ path: '/users/duffyduck/ratings'
82
+ method: 'PUT'
83
+ body:
84
+ s765: 6.0
85
+ s42: -2.0
86
+ response_expectation:
87
+ status_code: 409
88
+ body:
@@ -18,26 +18,6 @@
18
18
  response_expectation:
19
19
  status_code: 204
20
20
  body:
21
- - name: "There should not be any recommendations and a 204 because there are too few ratings"
22
- priority: 1
23
- request:
24
- headers:
25
- Content-Type: 'application/json'
26
- path: '/users/duffyduck/recommendations'
27
- method: 'GET'
28
- response_expectation:
29
- status_code: 204
30
- body: {}
31
- - name: "There should NOT be a prediction for a certain item"
32
- priority: 1
33
- request:
34
- headers:
35
- Content-Type: 'application/json'
36
- path: '/users/duffyduck/predictions/items/m965'
37
- method: 'GET'
38
- response_expectation:
39
- status_code: 204
40
- body:
41
21
  - name: "10 ratings in preparation for recommendation check should return a 204"
42
22
  request:
43
23
  headers:
@@ -68,7 +48,6 @@
68
48
  status_code: 200
69
49
  body: /^\[(\{"m\d+":[0-5]\.[05]\},)*\{"m\d+":[0-5]\.[05]\}\]$/
70
50
  - name: "There should be only 10 recommendations if per_page parameter is set"
71
- priority: 1
72
51
  request:
73
52
  headers:
74
53
  Content-Type: 'application/json'
@@ -88,21 +67,12 @@
88
67
  response_expectation:
89
68
  status_code: 404
90
69
  body:
91
- - name: "There should be a prediction for a certain item"
92
- request:
93
- headers:
94
- Content-Type: 'application/json'
95
- path: '/users/duffyduck/predictions/items/m965'
96
- method: 'GET'
97
- response_expectation:
98
- status_code: 200
99
- body: /^\[{"m\d+":[0-5]\.[05]}\]$/
100
- - name: "There should occure a 404 if a prediction for y certain item is requested for an unknown user"
70
+ - name: "There should be less than 2000 recommendations at all otherwise filtering does not apply"
101
71
  request:
102
72
  headers:
103
73
  Content-Type: 'application/json'
104
- path: '/users/daisyduck/predictions/items/m965'
74
+ path: '/users/duffyduck/recommendations'
105
75
  method: 'GET'
106
76
  response_expectation:
107
- status_code: 404
108
- body:
77
+ status_code: 200
78
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){1,1999}\{"m\d+":[0-5]\.[05]\}\]$/
@@ -0,0 +1,286 @@
1
+ - name: "10 movie only ratings in preparation for item prediction check should return a 204"
2
+ request:
3
+ headers:
4
+ Content-Type: 'application/json'
5
+ path: '/users/duffyduck/ratings'
6
+ method: 'PUT'
7
+ body:
8
+ m765: 1.0
9
+ m42: 2.0
10
+ m89: 3.0
11
+ m91: 4.0
12
+ m98: 5.0
13
+ m766: 1.0
14
+ m43: 2.0
15
+ m90: 3.0
16
+ m92: 4.0
17
+ m99: 5.0
18
+ response_expectation:
19
+ status_code: 204
20
+ body:
21
+ - name: "There should be a prediction for a certain movie item"
22
+ request:
23
+ headers:
24
+ Content-Type: 'application/json'
25
+ path: '/users/duffyduck/predictions/items/m965'
26
+ method: 'GET'
27
+ response_expectation:
28
+ status_code: 200
29
+ body: /^\[{"m\d+":[0-5]\.[05]}\]$/
30
+ - name: "There should occure a 404 if a prediction for a certain movie item is requested for an unknown user"
31
+ request:
32
+ headers:
33
+ Content-Type: 'application/json'
34
+ path: '/users/daisyduck/predictions/items/m965'
35
+ method: 'GET'
36
+ response_expectation:
37
+ status_code: 404
38
+ body:
39
+ - name: "10 series only ratings in preparation for item prediction check should return a 204"
40
+ request:
41
+ headers:
42
+ Content-Type: 'application/json'
43
+ path: '/users/duffyduck/ratings'
44
+ method: 'PUT'
45
+ body:
46
+ s50: 1.0
47
+ s51: 2.0
48
+ s52: 3.0
49
+ s69: 4.0
50
+ s70: 5.0
51
+ s71: 1.0
52
+ s86: 2.0
53
+ s87: 3.0
54
+ s88: 4.0
55
+ s99: 5.0
56
+ response_expectation:
57
+ status_code: 204
58
+ body:
59
+ - name: "There should be a prediction for a certain series item"
60
+ request:
61
+ headers:
62
+ Content-Type: 'application/json'
63
+ path: '/users/duffyduck/predictions/items/s401'
64
+ method: 'GET'
65
+ response_expectation:
66
+ status_code: 200
67
+ body: /^\[{"[s]\d+":[0-5]\.[05]}\]$/
68
+ - name: "There should occure a 404 if a prediction for a certain series item is requested for an unknown user"
69
+ request:
70
+ headers:
71
+ Content-Type: 'application/json'
72
+ path: '/users/daisyduck/predictions/items/m965'
73
+ method: 'GET'
74
+ response_expectation:
75
+ status_code: 404
76
+ body:
77
+ - name: "10 mixed movie and series ratings in preparation for item prediction check should return a 204"
78
+ request:
79
+ headers:
80
+ Content-Type: 'application/json'
81
+ path: '/users/duffyduck/ratings'
82
+ method: 'PUT'
83
+ body:
84
+ m765: 1.0
85
+ m42: 2.0
86
+ m89: 3.0
87
+ m91: 4.0
88
+ m98: 5.0
89
+ s71: 1.0
90
+ s86: 2.0
91
+ s87: 3.0
92
+ s88: 4.0
93
+ s99: 5.0
94
+ response_expectation:
95
+ status_code: 204
96
+ body:
97
+ - name: "There should be a prediction for a certain movie item"
98
+ request:
99
+ headers:
100
+ Content-Type: 'application/json'
101
+ path: '/users/duffyduck/predictions/items/m965'
102
+ method: 'GET'
103
+ response_expectation:
104
+ status_code: 200
105
+ body: /^\[{"m\d+":[0-5]\.[05]}\]$/
106
+ - name: "There should be a prediction for a certain series item"
107
+ request:
108
+ headers:
109
+ Content-Type: 'application/json'
110
+ path: '/users/duffyduck/predictions/items/s440'
111
+ method: 'GET'
112
+ response_expectation:
113
+ status_code: 200
114
+ body: /^\[{"s\d+":[0-5]\.[05]}\]$/
115
+ - name: "There should occure a 404 if a prediction for a certain movie item is requested for an unknown user"
116
+ request:
117
+ headers:
118
+ Content-Type: 'application/json'
119
+ path: '/users/daisyduck/predictions/items/m965'
120
+ method: 'GET'
121
+ response_expectation:
122
+ status_code: 404
123
+ body:
124
+ - name: "There should occure a 404 if a prediction for a certain series item is requested for an unknown user"
125
+ request:
126
+ headers:
127
+ Content-Type: 'application/json'
128
+ path: '/users/daisyduck/predictions/items/m965'
129
+ method: 'GET'
130
+ response_expectation:
131
+ status_code: 404
132
+ body:
133
+ - name: "There should come out 5 predictions for a multi item predictions request with 5 movies"
134
+ request:
135
+ headers:
136
+ Content-Type: 'application/json'
137
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053'
138
+ method: 'GET'
139
+ response_expectation:
140
+ status_code: 200
141
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){4}\{"m\d+":[0-5]\.[05]\}\]$/
142
+ - name: "There should come out 10 predictions for a multi item predictions request with 10 movies"
143
+ request:
144
+ headers:
145
+ Content-Type: 'application/json'
146
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228'
147
+ method: 'GET'
148
+ response_expectation:
149
+ status_code: 200
150
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/
151
+ - name: "There should come out 50 predictions for a multi item predictions request with 50 movies"
152
+ request:
153
+ headers:
154
+ Content-Type: 'application/json'
155
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279'
156
+ method: 'GET'
157
+ response_expectation:
158
+ status_code: 200
159
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){49}\{"m\d+":[0-5]\.[05]\}\]$/
160
+ - name: "There should come out 10 paginated predictions for a multi item predictions request with 50 movies and per_page=10 as well as page=1"
161
+ priority: 3
162
+ request:
163
+ headers:
164
+ Content-Type: 'application/json'
165
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279'
166
+ parameters:
167
+ per_page: 10
168
+ page: 1
169
+ method: 'GET'
170
+ response_expectation:
171
+ status_code: 200
172
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/
173
+ - name: "There should come out another 10 paginated predictions for a multi item predictions request with 50 movies per_page=10 as well as page=2"
174
+ priority: 3
175
+ request:
176
+ headers:
177
+ Content-Type: 'application/json'
178
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279'
179
+ parameters:
180
+ per_page: 10
181
+ page: 2
182
+ method: 'GET'
183
+ response_expectation:
184
+ status_code: 200
185
+ body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/
186
+ - name: "There should return a 404 if multi item predictions are requested for a non existant user"
187
+ request:
188
+ headers:
189
+ Content-Type: 'application/json'
190
+ path: '/users/daisyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228'
191
+ method: 'GET'
192
+ response_expectation:
193
+ status_code: 404
194
+ body:
195
+ - name: 'Creation of a testuser that does not rate but request predictions should be successful'
196
+ request:
197
+ headers:
198
+ Content-Type: 'application/json'
199
+ path: '/users/wileecoyote'
200
+ method: 'PUT'
201
+ body:
202
+ username: 'wileecoyote'
203
+ expires_at: 2011-09-09T22:41:50+00:00
204
+ response_expectation:
205
+ status_code: 201
206
+ headers:
207
+ Last-Modified: /.*/
208
+ body:
209
+ username: 'wileecoyote'
210
+ - name: "There should be no content as well as a 204 in case a user without ratings requests multi item predictions"
211
+ request:
212
+ headers:
213
+ Content-Type: 'application/json'
214
+ path: '/users/wileecoyote/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228'
215
+ method: 'GET'
216
+ response_expectation:
217
+ status_code: 204
218
+ body:
219
+ - name: 'Delete the testuser without ratings should be successful'
220
+ request:
221
+ path: '/users/wileecoyote'
222
+ method: 'DELETE'
223
+ body: {}
224
+ response_expectation:
225
+ status_code: 202
226
+ - name: 'The testuser without ratings who requested predictions anyway should not exist anymore now'
227
+ request:
228
+ path: '/users/wileecoyote'
229
+ method: 'GET'
230
+ body: {}
231
+ response_expectation:
232
+ status_code: 404
233
+ - name: "There should come out 5 predictions for a multi item predictions request with 5 series"
234
+ request:
235
+ headers:
236
+ Content-Type: 'application/json'
237
+ path: '/users/duffyduck/predictions/items/s377,s378,s379,s380,s381'
238
+ method: 'GET'
239
+ response_expectation:
240
+ status_code: 200
241
+ body: /^\[(\{"s\d+":[0-5]\.[05]\},){4}\{"s\d+":[0-5]\.[05]\}\]$/
242
+ - name: "There should come out 10 predictions for a multi item predictions request with 10 series"
243
+ request:
244
+ headers:
245
+ Content-Type: 'application/json'
246
+ path: '/users/duffyduck/predictions/items/s522,s485,s456,s397,s374,s297,s287,s252,s251,s220'
247
+ method: 'GET'
248
+ response_expectation:
249
+ status_code: 200
250
+ body: /^\[(\{"s\d+":[0-5]\.[05]\},){9}\{"s\d+":[0-5]\.[05]\}\]$/
251
+ - name: "There should come out 50 predictions for a multi item predictions request with 50 series"
252
+ request:
253
+ headers:
254
+ Content-Type: 'application/json'
255
+ path: '/users/duffyduck/predictions/items/s459,s460,s462,s464,s465,s469,s473,s475,s477,s481,s489,s492,s495,s498,s503,s506,s507,s508,s510,s514,s516,s537,s532,s531,s528,s523,s522,s485,s456,s397,s374,s297,s287,s252,s251,s220,s211,s207,s197,s137,s119,s96,s94,s58,s44,s36,s286,s371,s72,s578'
256
+ method: 'GET'
257
+ response_expectation:
258
+ status_code: 200
259
+ body: /^\[(\{"s\d+":[0-5]\.[05]\},){49}\{"s\d+":[0-5]\.[05]\}\]$/
260
+ - name: "There should come out 5 predictions for mixed multi item predictions request with 3 movies and 2 series"
261
+ request:
262
+ headers:
263
+ Content-Type: 'application/json'
264
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,s377,s378'
265
+ method: 'GET'
266
+ response_expectation:
267
+ status_code: 200
268
+ body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){4}\{"[sm]\d+":[0-5]\.[05]\}\]$/
269
+ - name: "There should come out 10 predictions for mixed multi item predictions request with 5 movies and 5 series"
270
+ request:
271
+ headers:
272
+ Content-Type: 'application/json'
273
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,s522,s485,s456,s397,s374'
274
+ method: 'GET'
275
+ response_expectation:
276
+ status_code: 200
277
+ body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){9}\{"[sm]\d+":[0-5]\.[05]\}\]$/
278
+ - name: "There should come out 50 predictions for mixed multi item predictions request with 25 movies and 25 series"
279
+ request:
280
+ headers:
281
+ Content-Type: 'application/json'
282
+ path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,s459,s460,s462,s464,s465,s469,s473,s475,s477,s481,s489,s492,s495,s498,s503,s506,s507,s508,s510,s514,s516,s537,s532,s531,s528'
283
+ method: 'GET'
284
+ response_expectation:
285
+ status_code: 200
286
+ body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){49}\{"[sm]\d+":[0-5]\.[05]\}\]$/