示例#1
0
def test_radio_all():
    s = DummySystemCommand('''WIFI-HW  WIFI     WWAN-HW  WWAN
enabled  disabled  enabled  disabled''')
    radio = RadioControl(s)
    r = radio.all()
    assert r == Radio(True, False, True, False)
    assert s.passed_parameters == ['radio', 'all']
示例#2
0
def test_radio_wwan_off():
    s = DummySystemCommand()
    radio = RadioControl(s)
    radio.wwan_off()
    assert s.passed_parameters == ['radio', 'wwan', 'off']
示例#3
0
def test_radio_wwan():
    s = DummySystemCommand('enabled\n')
    radio = RadioControl(s)
    assert radio.wwan()
    assert s.passed_parameters == ['radio', 'wwan']
    assert not RadioControl(DummySystemCommand('disabled\n')).wwan()
示例#4
0
def test_radio_wifi_on():
    s = DummySystemCommand()
    radio = RadioControl(s)
    radio.wifi_on()
    assert s.passed_parameters == ['radio', 'wifi', 'on']