def test_options(self, lib): _lib = Mock() _lib.GLib.Variant.side_effect = variant lib.return_value = _lib # test remote = Remote('', '') remote.ssl_key_path = '/tmp/key' remote.ssl_cert_path = '/tmp/certificate' remote.ssl_ca_path = '/tmp/ca' remote.ssl_validation = True remote.gpg_validation = True remote.proxy_url = 'http://proxy' options = remote.options # validation self.assertEqual( options, ('a{sv}', { 'tls-client-cert-path': ('s', '/tmp/certificate'), 'tls-client-key-path': ('s', '/tmp/key'), 'tls-permissive': ('s', 'false'), 'gpg-verify': ('s', 'true'), 'tls-ca-path': ('s', '/tmp/ca'), 'proxy': ('s', 'http://proxy') }) )