Review: Needs Fixing

279 + with patch('os.path.exists'):
280 +     service_item_osd.set_from_service(osd_item, u'/dummy/path')
281 + with patch('os.path.exists'):
282 +      service_item_osj.set_from_service(osj_item, u'/dummy/path')

Why do you have 2 context managers, you only need 1. Also, you don't specify a 
return value, so the method always returns a mock._patch object, so this will 
always evaluate to true.

>>> from mock import patch
>>> val = patch('os.path.exists')
>>> print val
<mock._patch object at 0x7f727536df50>
-- 
https://code.launchpad.net/~tomasgroth/openlp/json-service-format/+merge/171168
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to