Skip to content

Commit

Permalink
feat(gateway): fix uts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanrw committed Aug 21, 2024
1 parent becf14d commit 43e8546
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.tddworks.anthropic.api

import com.tddworks.anthropic.di.iniAnthropic
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.koin.test.junit5.AutoCloseKoinTest

class AnthropicTest {

Expand All @@ -16,7 +13,7 @@ class AnthropicTest {

assertEquals("CONFIG_API_KEY", anthropic.apiKey())

assertEquals("CONFIG_API_KEY", anthropic.apiKey())
assertEquals("api.anthropic.com", anthropic.baseUrl())

assertEquals("2023-06-01", anthropic.anthropicVersion())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class OllamaTestTest : AutoCloseKoinTest() {

@Test
fun `should return default settings`() {
val target = Ollama()
val target = Ollama.create(ollamaConfig = OllamaConfig())

assertEquals("localhost", target.baseUrl())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class AnthropicTest : AutoCloseKoinTest() {
@Test
fun `should create anthropic with default settings`() {

val anthropic = Anthropic()
val anthropic = Anthropic.create(anthropicConfig = AnthropicConfig())

assertEquals("CONFIGURE_ME", anthropic.apiKey())
assertEquals("CONFIG_API_KEY", anthropic.apiKey())
assertEquals(Anthropic.BASE_URL, anthropic.baseUrl())
assertEquals("2023-06-01", anthropic.anthropicVersion())
}
Expand Down

0 comments on commit 43e8546

Please sign in to comment.