'Validate the response\'s status and detail message.'

def assert_error_response(self, response, msg, status_code=400):

    self.assertEqual(response.status_code, status_code)
    self.assertDictEqual(response.data, {u'detail': msg})
