1use bitwarden_api_api::apis::configuration::Configuration;
2
3pub async fn start_api_mock(mocks: Vec<wiremock::Mock>) -> (wiremock::MockServer, Configuration) {
7 let server = wiremock::MockServer::start().await;
8
9 for mock in mocks {
10 server.register(mock).await;
11 }
12
13 let config = Configuration {
14 base_path: server.uri(),
15 user_agent: Some("test-agent".to_string()),
16 client: reqwest::Client::new(),
17 basic_auth: None,
18 oauth_access_token: None,
19 bearer_access_token: None,
20 api_key: None,
21 };
22
23 (server, config)
24}