コード例 #1
0
ファイル: test_radio.py プロジェクト: ryanteck/nmcli
def test_wifi_when_raise_error():
    c = DummyRadioControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.wifi()
コード例 #2
0
ファイル: test_radio.py プロジェクト: ryanteck/nmcli
def test_wifi_when_no_arguments_are_passed():
    c = DummyRadioControl()
    with pytest.raises(ValueError):
        c.wifi()
コード例 #3
0
ファイル: test_radio.py プロジェクト: ryanteck/nmcli
def test_wifi():
    result_wifi = True
    c = DummyRadioControl(result_wifi=result_wifi)
    assert c.wifi() == result_wifi