def test_echo_parented(self): """Should call parent echo""" r = Response() parent = Response().consume(r) func = mock.MagicMock() with patch.object(parent, 'echo', func): r.echo() func.assert_any_call()
def test_echo_parented(self): """Should call parent echo""" r = Response() parent = Response().consume(r) func = mock.MagicMock() with patch.object(parent, 'echo', func): r.echo() func.assert_any_call()
def test_echo(self): """Should echo information""" r = Response() r.warn('WARNING', something=[1, 2, 3], value=False) r.fail('ERROR') result = r.echo() self.assertGreater(result.find('WARNING'), 0) self.assertGreater(result.find('ERROR'), 0)
def test_echo(self): """Should echo information""" r = Response() r.warn('WARNING', something=[1, 2, 3], value=False) r.fail('ERROR') result = r.echo() self.assertGreater(result.find('WARNING'), 0) self.assertGreater(result.find('ERROR'), 0)