def assert_no_pending(self, target_rule=None):
if target_rule:<EOL><INDENT>if target_rule in self._rules:<EOL><INDENT>raise PendingRequestsLeftException()<EOL><DEDENT><DEDENT>elif self._rules:<EOL><INDENT>raise PendingRequestsLeftException()<EOL><DEDENT>
Raises a :class:`PendingRequestsLeftException` error if server has target rule
non-resolved.

When target_rule argument is ommitted raises if server has any pending
expectations.

Useful in ``tearDown()`` test method to verify that test had correct expectations

:type target_rule: Rule
:param target_rule: will raise if this rule is left pending

:raises: :class:`PendingRequestsLeftException`