WIP: Add another test to check that both tests are working properly

This commit is contained in:
Raoul Snyman 2015-04-27 11:12:28 +02:00
parent ab54b04468
commit 1ad2578065

View File

@ -51,3 +51,19 @@ class TestVLCPlayer(TestCase):
self.assertIn('VLC_PLUGIN_PATH', os.environ, self.assertIn('VLC_PLUGIN_PATH', os.environ,
'The plugin path should be in the environment variables') 'The plugin path should be in the environment variables')
self.assertEqual('/Applications/VLC.app/Contents/MacOS/plugins', os.environ['VLC_PLUGIN_PATH']) self.assertEqual('/Applications/VLC.app/Contents/MacOS/plugins', os.environ['VLC_PLUGIN_PATH'])
@patch.dict(os.environ)
@patch('openlp.core.ui.media.vlcplayer.is_macosx')
def not_osx_fix_vlc_22_plugin_path_test(self, mocked_is_macosx):
"""
Test that on Linux or some other non-OS X we do not set the VLC plugin path
"""
# GIVEN: We're not on OS X
mocked_is_macosx.return_value = False
# WHEN: An checking if the player is available
get_vlc()
# THEN: The extra environment variable should NOT be there
self.assertNotIn('VLC_PLUGIN_PATH', os.environ,
'The plugin path should NOT be in the environment variables')