Review: Needs Fixing
You're still not using the patch context manager correctly. When you use it
like that, all calls to os.path.exists will always return true, even if you
don't want it to. The whole idea behind using the patch method is that you are
able to control the output of an unrelated function.
with patch(u'openlp.core.ui.servicemanager.os.path.exists') as mocked_exists:
mocked_exists.return_value = True
service_item.set_from_service(...)
--
https://code.launchpad.net/~tomasgroth/openlp/json-service-format/+merge/171656
Your team OpenLP Core is subscribed to branch lp:openlp.
_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help : https://help.launchpad.net/ListHelp