def check_attribute(self, name, paginator, expected, params, coerce=None):
got = getattr(paginator, name)<EOL>if coerce is not None:<EOL><INDENT>got = coerce(got)<EOL><DEDENT>self.assertEqual(<EOL>expected, got,<EOL>"<STR_LIT>"<EOL>% (name, expected, got, params)<EOL>)<EOL>
Helper method that checks a single attribute and gives a nice error
message upon test failure.