Skip to content

Commit

Permalink
Minor fixes and test adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac Davies committed Dec 24, 2024
1 parent d5b145d commit a8eba33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/chattr-use.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ ch_get_ymls <- function(menu = TRUE) {
}

if (!dbrx_exists) {
prep_files$`databricks-meta-llama-3-1-405b-instruct` <- NULL
prep_files$`databricks-meta-llama-3-3-70b-instruct` <- NULL
prep_files$`databricks-meta-llama-3-1-405b` <- NULL
prep_files$`databricks-meta-llama-3-3-70b` <- NULL
}

if (!llama_exists) {
Expand Down
6 changes: 5 additions & 1 deletion tests/testthat/test-chattr-use.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ test_that("Missing token prevents showing the option", {
test_that("Menu works", {
skip_on_cran()
withr::with_envvar(
new = c("OPENAI_API_KEY" = "test", "DATABRICKS_TOKEN" = NA),
new = c(
"OPENAI_API_KEY" = "test",
"DATABRICKS_HOST" = NA,
"DATABRICKS_TOKEN" = NA
),
{
local_mocked_bindings(
menu = function(...) {
Expand Down

0 comments on commit a8eba33

Please sign in to comment.