'Assert that an API method was called anytime in the test.'

def assert_called_anytime(self, method, url, body=None):

    expected = (method, url)
    assert self.client.callstack, ('Expected    %s    %s    but    no    calls    were    made.' % expected)
    found = False
    for entry in self.client.callstack:
        if (expected == entry[0:2]):
            found = True
            break
    assert found, ('Expected    %s    %s;    got    %s' % (expected, self.client.callstack))
    if (body is not None):
        try:
            assert (entry[2] == body)
        except AssertionError:
            print entry[2]
            print '!='
            print body
            raise
    self.client.callstack = []
