'Invalid POSTs return an error status code and JSON of the form
{"result": "error", "msg": "reason"}.'

def assert_json_error(self, result, msg, status_code=400):

    self.assertEqual(self.get_json_error(result, status_code=status_code), msg)
