

def test_load_raises_error_when_timeout_is_reached(self, is_loaded_mock, time_mock):
    is_loaded_mock.return_value = False
    time_mock.time.side_effect = time.time
    foo = Foo(self.session)
    with self.assertRaises(spotify.Timeout):
        foo.load(timeout=0)

dataset/ETHPy150Open mopidy/pyspotify/tests/test_loadable.py LoadableTest.test_load_raises_error_when_timeout_is_reached/original