'anchor, num_before, and num_after are all required
POST parameters for get_messages.'

def test_missing_params(self):

    self.login(self.example_email('hamlet'))
    required_args = (('anchor', 1), ('num_before', 1), ('num_after', 1))
    for i in range(len(required_args)):
        post_params = dict((required_args[:i] + required_args[(i + 1):]))
        result = self.client_get('/json/messages', post_params)
        self.assert_json_error(result, ("Missing    '%s'    argument" % (required_args[i][0],)))
