Logo Search packages:      
Sourcecode: ubuntu-sso-client version File versions  Download package

def mocker::Event::verify (   self  )  [inherited]

Run verify on all tasks.

The verify method is supposed to raise an AssertionError if the
task has unmet expectations, with a one-line explanation about
why this item is unmet.  This method should be safe to be called
multiple times without side effects.

Definition at line 1557 of file mocker.py.

01557                     :
        """Run verify on all tasks.

        The verify method is supposed to raise an AssertionError if the
        task has unmet expectations, with a one-line explanation about
        why this item is unmet.  This method should be safe to be called
        multiple times without side effects.
        """
        errors = []
        for task in self._tasks:
            try:
                task.verify()
            except AssertionError, e:
                error = str(e)
                if not error:
                    raise RuntimeError("Empty error message from %r" % task)
                errors.append(error)
        if errors:
            message = [str(self.path)]
            for error in errors:
                lines = error.splitlines()
                message.append("- " + lines.pop(0))
                message.extend(["  " + line for line in lines])
            raise AssertionError(os.linesep.join(message))

    def replay(self):


Generated by  Doxygen 1.6.0   Back to index