Skip to content

Commit

Permalink
Fix to "resolve" URL
Browse files Browse the repository at this point in the history
  • Loading branch information
pcuenca committed Dec 24, 2024
1 parent d656ad4 commit a70fd33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/HubTests/HubApiTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ class HubApiTests: XCTestCase {

func testGetFileMetadataBlobPath() async throws {
do {
let url = URL(string: "https://huggingface.co/coreml-projects/Llama-2-7b-chat-coreml/blob/main/config.json")
let url = URL(string: "https://huggingface.co/coreml-projects/Llama-2-7b-chat-coreml/resolve/main/config.json")
let metadata = try await Hub.getFileMetadata(fileURL: url!)

XCTAssertEqual(metadata.commitHash, nil)
XCTAssertTrue(metadata.etag != nil && metadata.etag!.hasPrefix("10841-"))
XCTAssertNotNil(metadata.commitHash)
XCTAssertTrue(metadata.etag != nil && metadata.etag!.hasPrefix("d6ceb9"))
XCTAssertEqual(metadata.location, url?.absoluteString)
XCTAssertEqual(metadata.size, 67649)
XCTAssertEqual(metadata.size, 163)
} catch {
XCTFail("\(error)")
}
Expand Down

0 comments on commit a70fd33

Please sign in to comment.