def step_init(self):
     base = BaseController()
     init = InitServerController()
     configuration = base.create_api_config(
         self.config["security_server"][0], self.config)
     status = init.check_init_status(configuration)
     assert status.is_anchor_imported is False
     assert status.is_server_code_initialized is False
     init.initialize_server(self.config)
     status = init.check_init_status(configuration)
     assert status.is_anchor_imported is True
     assert status.is_server_code_initialized is True
 def test_create_api_config(self):
     with XRDSSTTest() as app:
         base_controller = BaseController()
         base_controller.app = app
         temp_file_name = os.path.join(ROOT_DIR, "conf.yaml")
         config = self.create_temp_conf(base_controller, temp_file_name)
         os.environ["TOOLKIT_SS1_API_KEY"] = "f13d5108-7799-426d-a024-1300f52f4a51"
         os.environ["TOOLKIT_SS2_API_KEY"] = "a13d5108-7799-426d-a024-1300f52f4a51"
         for security_server in config["security_server"]:
             configuration = Configuration()
             configuration.api_key['Authorization'] = os.getenv(security_server["api_key"], "")
             configuration.host = security_server["url"]
             configuration.verify_ssl = False
             response = base_controller.create_api_config(security_server)
             assert response.api_key == configuration.api_key
             assert response.host == configuration.host
             assert response.verify_ssl == configuration.verify_ssl
         os.remove(temp_file_name)