def test_write_reboot_writeonly_prop__if_write_wrong_value__should_raise_error( self, value): sdk = Mock() sdk.set_device_param.return_value = None obj = DeviceParameters(sdk, ZK400) with pytest.raises(TypeError): obj.reboot = value
def test_write_reboot_writeonly_prop__if_write_1__should_set_value_on_a_device( self): sdk = Mock() sdk.set_device_param.return_value = None obj = DeviceParameters(sdk, ZK400) obj.reboot = True sdk.set_device_param.assert_called_once_with( parameters={'Reboot': '1'})