@@ -147,11 +147,11 @@ def test_not_found_on_get(self):
147147 self .assertRaises (self .error_responses [404 ], self .cs .countries )
148148
149149 def test_other_client_error_on_get (self ):
150- self .cs .stub_request ('countries.json' , None , status = 418 )
150+ self .cs .stub_request ('countries.json' , 'sample_client_error.json' , status = 418 )
151151 self .assertRaises (self .error_responses [418 ], self .cs .countries )
152152
153153 def test_server_error_on_get (self ):
154- self .cs .stub_request ('countries.json' , None , status = 500 )
154+ self .cs .stub_request ('countries.json' , 'sample_server_error.json' , status = 500 )
155155 self .assertRaises (self .error_responses [500 ], self .cs .countries )
156156
157157 def test_bad_request_on_post (self ):
@@ -176,13 +176,13 @@ def test_not_found_on_post(self):
176176
177177 def test_other_client_error_on_post (self ):
178178 client = Client (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
179- client .stub_request ('clients.json' , None , status = 418 )
179+ client .stub_request ('clients.json' , 'sample_client_error.json' , status = 418 )
180180 self .assertRaises (self .error_responses [418 ], client .create , "Client Company Name" ,
181181 "(GMT+10:00) Canberra, Melbourne, Sydney" , "Australia" )
182182
183183 def test_server_error_on_post (self ):
184184 client = Client (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
185- client .stub_request ('clients.json' , None , status = 500 )
185+ client .stub_request ('clients.json' , 'sample_server_error.json' , status = 500 )
186186 self .assertRaises (self .error_responses [500 ], client .create , "Client Company Name" ,
187187 "(GMT+10:00) Canberra, Melbourne, Sydney" , "Australia" )
188188
@@ -210,14 +210,14 @@ def test_not_found_on_put(self):
210210 def test_other_client_error_on_put (self ):
211211 template = Template (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
212212 template .stub_request (
213- 'templates/uhiuhiuhiuhiuhiuhiuh.json' , None , status = 418 )
213+ 'templates/uhiuhiuhiuhiuhiuhiuh.json' , 'sample_client_error.json' , status = 418 )
214214 self .assertRaises (self .error_responses [418 ], template .update , "Template One Updated" , "http://templates.org/index.html" ,
215215 "http://templates.org/files.zip" )
216216
217217 def test_server_error_on_put (self ):
218218 template = Template (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
219219 template .stub_request (
220- 'templates/uhiuhiuhiuhiuhiuhiuh.json' , None , status = 500 )
220+ 'templates/uhiuhiuhiuhiuhiuhiuh.json' , 'sample_server_error.json' , status = 500 )
221221 self .assertRaises (self .error_responses [500 ], template .update , "Template One Updated" , "http://templates.org/index.html" ,
222222 "http://templates.org/files.zip" )
223223
@@ -242,13 +242,13 @@ def test_not_found_on_delete(self):
242242 def test_other_client_error_on_delete (self ):
243243 template = Template (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
244244 template .stub_request (
245- 'templates/uhiuhiuhiuhiuhiuhiuh.json' , None , status = 418 )
245+ 'templates/uhiuhiuhiuhiuhiuhiuh.json' , 'sample_client_error.json' , status = 418 )
246246 self .assertRaises (self .error_responses [418 ], template .delete )
247247
248248 def test_server_error_on_delete (self ):
249249 template = Template (self .cs .auth_details , "uhiuhiuhiuhiuhiuhiuh" )
250250 template .stub_request (
251- 'templates/uhiuhiuhiuhiuhiuhiuh.json' , None , status = 500 )
251+ 'templates/uhiuhiuhiuhiuhiuhiuh.json' , 'sample_server_error.json' , status = 500 )
252252 self .assertRaises (self .error_responses [500 ], template .delete )
253253
254254
0 commit comments