def test_write(self, debug, domain, key, value, force): defaults = Defaults(debug) args = ["defaults", "write"] + (["-f"] if force else []) args += [domain, key, defaults.key_type(value), str(value)] defaults.write(domain, key, value, force) sh.spawn.assert_called_with(args, debug=debug, env=defaults.env)
def test_delete(self, debug, domain, key): defaults = Defaults(debug) args = ["defaults", "delete", domain, key] defaults.delete(domain, key) sh.spawn.assert_called_with(args, debug=debug, env=defaults.env)