def setUp(self): self.config = config.Config() self.ca_path = '/some/path' self.config['filesystem'] = { 'id_cert_dir': '/dir/', 'id_cert_filename': 'file' } self.config['server'] = { 'host': 'awesome_host', 'port': 1234, 'verify_ssl': 'true', 'ca_path': self.ca_path }
def test_verify_ssl_true(self, read_config): """ Make sure that verify_ssl is passed correctly when it is true. """ ca_path = '/some/path' node_config = {'parent_oauth': {'key': 'some_key', 'secret': 'ssssh!', 'user_id': 'bgates'}, 'main': {'verify_ssl': 'True', 'ca_path': ca_path}} node_config = config.Config(node_config).graph() read_config.return_value = node_config bindings = resources.pulp_bindings() self.assertEqual(bindings.bindings.server.ca_path, ca_path) self.assertEqual(bindings.bindings.server.verify_ssl, True)