def test_wwan_when_no_arguments_are_passed(): c = DummyRadioControl() with pytest.raises(ValueError): c.wwan()
def test_call_when_raise_error(): c = DummyRadioControl(raise_error=Exception) with pytest.raises(Exception): c()
def test_wwan_when_raise_error(): c = DummyRadioControl(raise_error=Exception) with pytest.raises(Exception): c.wwan()
def test_wifi_off_when_raise_error(): c = DummyRadioControl(raise_error=Exception) with pytest.raises(Exception): c.wifi_off()
def test_wwan(): result_wwan = True c = DummyRadioControl(result_wwan=result_wwan) assert c.wwan() == result_wwan
def test_wifi_off(): c = DummyRadioControl() c.wifi_off() assert c.called_wifi_off == 1
def test_wifi(): result_wifi = True c = DummyRadioControl(result_wifi=result_wifi) assert c.wifi() == result_wifi
def test_all_off(): c = DummyRadioControl() c.all_off() assert c.called_all_off == 1
def test_call(): result_call = Radio(True, True, True, True) c = DummyRadioControl(result_call) assert c() == result_call
def test_wwan_on(): c = DummyRadioControl() c.wwan_on() assert c.called_wwan_on == 1