Ejemplo n.º 1
0
    def test_set_delay(self):
        m = CoroutineMock()
        m.delay = 1
        with self.assertRaises(asyncio.TimeoutError):
            run_coroutine(m(), timeout=0.01)

        self.assertSequenceEqual([
            unittest.mock.call(),
        ], m.mock_calls)
Ejemplo n.º 2
0
    def test_set_delay(self):
        m = CoroutineMock()
        m.delay = 1
        with self.assertRaises(asyncio.TimeoutError):
            run_coroutine(m(), timeout=0.01)

        self.assertSequenceEqual(
            [
                unittest.mock.call(),
            ],
            m.mock_calls
        )