'Compare the expected result with the one returned by the client.'

def _checkModeChange(self, expected, target=None):

    result = self._parseModeChange(self.client.calls, target)
    self.assertEqual(result, expected)
    self.client.calls = []
