Skip to content

Commit

Permalink
fix tests for Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
zakiali committed Jan 3, 2025
1 parent d601d93 commit 198f871
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/goose/src/providers/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ mod tests {

#[async_trait]
impl Provider for TestProvider {
fn get_usage(&self, _data: &Value) -> Result<Usage> {
Ok(Usage::new(Some(1), Some(1), Some(2)))
}

fn get_model_config(&self) -> &ModelConfig {
panic!("Should not be called");
}
Expand Down Expand Up @@ -307,6 +311,10 @@ mod tests {

#[async_trait]
impl Provider for TestProvider {
fn get_usage(&self, _data: &Value) -> Result<Usage> {
Ok(Usage::new(Some(1), Some(1), Some(2)))
}

fn get_model_config(&self) -> &ModelConfig {
panic!("Should not be called");
}
Expand Down Expand Up @@ -367,6 +375,10 @@ mod tests {

#[async_trait]
impl Provider for TestProvider {
fn get_usage(&self, _data: &Value) -> Result<Usage> {
Ok(Usage::new(Some(1), Some(1), Some(2)))
}

fn get_model_config(&self) -> &ModelConfig {
panic!("Should not be called");
}
Expand Down Expand Up @@ -426,6 +438,10 @@ mod tests {

#[async_trait]
impl Provider for TestProvider {
fn get_usage(&self, _data: &Value) -> Result<Usage> {
Ok(Usage::new(Some(1), Some(1), Some(2)))
}

fn get_model_config(&self) -> &ModelConfig {
panic!("Should not be called");
}
Expand Down

0 comments on commit 198f871

Please sign in to comment.