Make helpers.get_pyinstaller_resource_path work when package is not frozen, and make tests report real platform to get accurate paths

This commit is contained in:
Micah Lee 2016-04-12 10:43:28 -07:00
parent ef5665b050
commit e8ce6b1c54
2 changed files with 11 additions and 6 deletions

View file

@ -23,5 +23,7 @@ import test_helpers
def test_get_platform_returns_platform_system():
"""get_platform() returns platform.system() when ONIONSHARE_PLATFORM is not defined"""
p = helpers.platform.system
helpers.platform.system = lambda: 'Sega Saturn'
assert helpers.get_platform() == 'Sega Saturn'
helpers.platform.system = p