Revision 381a548c snf-django-lib/snf_django/utils/testing.py

b/snf-django-lib/snf_django/utils/testing.py
256 256
        self.assertFault(response, 404, 'itemNotFound')
257 257

  
258 258
    def assertMethodNotAllowed(self, response):
259
        self.assertFault(response, 400, 'badRequest')
259
        self.assertFault(response, 405, 'notAllowed')
260
        self.assertTrue('Allow' in response)
260 261
        try:
261 262
            error = json.loads(response.content)
262 263
        except ValueError:
263 264
            self.assertTrue(False)
264
        self.assertEqual(error['badRequest']['message'], 'Method not allowed')
265
        self.assertEqual(error['notAllowed']['message'], 'Method not allowed')
265 266

  
266 267

  
267 268
# Imitate unittest assertions new in Python 2.7

Also available in: Unified diff