Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
1 changed files with 1305 additions and 331 deletions
|
|
@ -21,13 +21,19 @@ class Buttons(unittest.TestCase):
|
|||
with self.assertRaises(ValueError):b.control(p)
|
||||
|
||||
def test_display_state_updates_all_logind_sessions(self):
|
||||
sessions='1 32011 droidian - 1017 manager - no -\nc2 32011 droidian - 1082 background - no -\nc3 32011 droidian seat0 1119 user tty7 no -\n'
|
||||
with patch.object(b.subprocess,'run') as run:
|
||||
run.side_effect=[type('Result',(),{'stdout':sessions})(),None,None,None]
|
||||
self.assertTrue(b.set_session_idle(True))
|
||||
calls=[call.args[0] for call in run.call_args_list[1:]]
|
||||
self.assertEqual(len(calls),3)
|
||||
self.assertTrue(all(call[-2:]==['b','true'] for call in calls))
|
||||
import subprocess
|
||||
rows = [['1',32011,'droidian','','/org/freedesktop/login1/session/_31'],
|
||||
['c2',32011,'droidian','seat0','/org/freedesktop/login1/session/c2'],
|
||||
['2',1000,'tester','','/org/freedesktop/login1/session/_32']]
|
||||
listing = subprocess.CompletedProcess([],0,b.json.dumps({'data':[rows]}))
|
||||
for first_status in (0,1):
|
||||
with patch.object(b.subprocess,'run') as run:
|
||||
run.side_effect=[listing,subprocess.CompletedProcess([],first_status,'','error'),
|
||||
subprocess.CompletedProcess([],0,'','')]
|
||||
self.assertEqual(b.set_session_idle(True),first_status==0)
|
||||
calls=[call.args[0] for call in run.call_args_list[1:]]
|
||||
self.assertEqual([cmd[4] for cmd in calls],[rows[0][-1],rows[1][-1]])
|
||||
self.assertTrue(all(cmd[-2:]==['b','true'] for cmd in calls))
|
||||
|
||||
def test_vibration_pattern_progresses_without_blocking_and_can_be_cancelled(self):
|
||||
with tempfile.TemporaryDirectory() as d,patch.object(b,'VIBRATOR',Path(d)),patch.object(b.time,'monotonic',return_value=10):
|
||||
|
|
|
|||
Loading…
Reference in a new issue