From 3cff989cc7f187f17cb0eb96efc3dd74122f5e5f Mon Sep 17 00:00:00 2001 From: Ihor Makhnyk Date: Fri, 22 Mar 2024 13:43:37 +0200 Subject: [PATCH] Fix tests - port to URL --- Tests/OpenAITests/OpenAITests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/OpenAITests/OpenAITests.swift b/Tests/OpenAITests/OpenAITests.swift index b98c3caa..bae3e015 100644 --- a/Tests/OpenAITests/OpenAITests.swift +++ b/Tests/OpenAITests/OpenAITests.swift @@ -392,14 +392,14 @@ class OpenAITests: XCTestCase { let configuration = OpenAI.Configuration(token: "foo", organizationIdentifier: "bar", timeoutInterval: 14) let openAI = OpenAI(configuration: configuration, session: self.urlSession) let chatsURL = openAI.buildURL(path: .chats) - XCTAssertEqual(chatsURL, URL(string: "https://api.openai.com/v1/chat/completions")) + XCTAssertEqual(chatsURL, URL(string: "https://api.openai.com:443/v1/chat/completions")) } func testCustomURLBuilt() { let configuration = OpenAI.Configuration(token: "foo", organizationIdentifier: "bar", host: "my.host.com", timeoutInterval: 14) let openAI = OpenAI(configuration: configuration, session: self.urlSession) let chatsURL = openAI.buildURL(path: .chats) - XCTAssertEqual(chatsURL, URL(string: "https://my.host.com/v1/chat/completions")) + XCTAssertEqual(chatsURL, URL(string: "https://my.host.com:443/v1/chat/completions")) } }