예제 #1
0
    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()
예제 #2
0
    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()
예제 #3
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)
예제 #4
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)