

def test_load_returns_immediately_if_offline_but_already_loaded(self, is_loaded_mock, time_mock):
    time_mock.return_value = True
    self.session.connection.state = spotify.ConnectionState.OFFLINE
    foo = Foo(self.session)
    result = foo.load()
    self.assertEqual(result, foo)
    self.assertEqual(self.session.process_events.call_count, 0)

dataset/ETHPy150Open mopidy/pyspotify/tests/test_loadable.py LoadableTest.test_load_returns_immediately_if_offline_but_already_loaded/VarMisuse@14/33 `is_loaded_mock`->`time_mock`