Revision 2ad4eb80

b/snf-django-lib/snf_django/utils/testing.py
187 187
    def assertItemNotFound(self, response):
188 188
        self.assertFault(response, 404, 'itemNotFound')
189 189

  
190
    def assertMethodNotAllowed(self, response):
191
        self.assertFault(response, 400, 'badRequest')
192
        try:
193
            error = json.loads(response.content)
194
        except ValueError:
195
            self.assertTrue(False)
196
        self.assertEqual(error['badRequest']['message'], 'Method not allowed')
197

  
190 198

  
191 199
# Imitate unittest assertions new in Python 2.7
192 200

  

Also available in: Unified diff