Ejemplo n.º 1
0
def test_wwan_when_no_arguments_are_passed():
    c = DummyRadioControl()
    with pytest.raises(ValueError):
        c.wwan()
Ejemplo n.º 2
0
def test_call_when_raise_error():
    c = DummyRadioControl(raise_error=Exception)
    with pytest.raises(Exception):
        c()
Ejemplo n.º 3
0
def test_wwan_when_raise_error():
    c = DummyRadioControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.wwan()
Ejemplo n.º 4
0
def test_wifi_off_when_raise_error():
    c = DummyRadioControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.wifi_off()
Ejemplo n.º 5
0
def test_wwan():
    result_wwan = True
    c = DummyRadioControl(result_wwan=result_wwan)
    assert c.wwan() == result_wwan
Ejemplo n.º 6
0
def test_wifi_off():
    c = DummyRadioControl()
    c.wifi_off()
    assert c.called_wifi_off == 1
Ejemplo n.º 7
0
def test_wifi():
    result_wifi = True
    c = DummyRadioControl(result_wifi=result_wifi)
    assert c.wifi() == result_wifi
Ejemplo n.º 8
0
def test_all_off():
    c = DummyRadioControl()
    c.all_off()
    assert c.called_all_off == 1
Ejemplo n.º 9
0
def test_call():
    result_call = Radio(True, True, True, True)
    c = DummyRadioControl(result_call)
    assert c() == result_call
Ejemplo n.º 10
0
def test_wwan_on():
    c = DummyRadioControl()
    c.wwan_on()
    assert c.called_wwan_on == 1