Example #1
0
    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)
Example #2
0
File: test_sh.py Project: a-b/cider
    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)
Example #3
0
    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)
Example #4
0
File: test_sh.py Project: a-b/cider
    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)