33
44from __future__ import absolute_import , division , print_function , unicode_literals
55import unittest
6+ import platform
67import inputstreamhelper
78
89xbmc = __import__ ('xbmc' )
@@ -15,24 +16,34 @@ class WindowsX64Tests(unittest.TestCase):
1516
1617 def test_check_inputstream_mpd (self ):
1718 inputstreamhelper .system_os = lambda : 'Windows'
19+ platform .machine = lambda : 'x86_64'
1820 is_helper = inputstreamhelper .Helper ('mpd' , drm = 'com.widevine.alpha' )
19- is_helper ._arch = lambda : 'x86_64'
2021 is_helper .remove_widevine ()
2122 is_installed = is_helper .check_inputstream ()
2223 self .assertTrue (is_installed , True )
2324
24- def test_check_inputstream_mpd_again (self ):
25+ def test_check_inputstream_hls_again (self ):
2526 inputstreamhelper .system_os = lambda : 'Windows'
26- is_helper = inputstreamhelper .Helper ('mpd' , drm = 'com.widevine.alpha' )
27- is_helper ._arch = lambda : 'x86_64'
27+ platform .machine = lambda : 'AMD64'
28+ platform .architecture = lambda : ['64bit' , '' ]
29+ is_helper = inputstreamhelper .Helper ('hls' , drm = 'com.widevine.alpha' )
2830 is_installed = is_helper .check_inputstream ()
2931 self .assertTrue (is_installed , True )
3032
3133 def test_check_inputstream_rtmp (self ):
3234 inputstreamhelper .system_os = lambda : 'Windows'
33- is_helper = inputstreamhelper .Helper ('rtmp' , drm = 'com.widevine.alpha' )
34- is_helper ._arch = lambda : 'x86_64'
35+ platform .machine = lambda : 'x86_64'
36+ is_helper = inputstreamhelper .Helper ('rtmp' )
37+ is_installed = is_helper .check_inputstream ()
38+ self .assertTrue (is_installed , True )
39+
40+ def test_check_inputstream_disabled (self ):
41+ inputstreamhelper .system_os = lambda : 'Windows'
42+ platform .machine = lambda : 'x86_64'
43+ is_helper = inputstreamhelper .Helper ('mpd' , drm = 'com.widevine.alpha' )
44+ is_helper .disable ()
3545 is_installed = is_helper .check_inputstream ()
46+ is_helper .enable ()
3647 self .assertTrue (is_installed , True )
3748
3849
0 commit comments