forked from openlp/openlp
Forgot to mock out another method.
This commit is contained in:
parent
ee6495e08f
commit
0483fdc8ea
@ -54,11 +54,13 @@ class TestAppLocation(TestCase):
|
||||
"""
|
||||
Test the AppLocation.get_data_path() method when a custom location is set in the settings
|
||||
"""
|
||||
with patch(u'openlp.core.utils.Settings') as mocked_class:
|
||||
with patch(u'openlp.core.utils.Settings') as mocked_class,\
|
||||
patch(u'openlp.core.utils.os') as mocked_os:
|
||||
# GIVEN: A mocked out Settings class which returns a custom data location
|
||||
mocked_settings = mocked_class.return_value
|
||||
mocked_settings.contains.return_value = True
|
||||
mocked_settings.value.return_value.toString.return_value = u'custom/dir'
|
||||
mocked_os.path.normpath.return_value = u'custom/dir'
|
||||
# WHEN: we call AppLocation.get_data_path()
|
||||
data_path = AppLocation.get_data_path()
|
||||
# THEN: the mocked Settings methods were called and the value returned was our set up value
|
||||
|
Loading…
Reference in New Issue
Block a user