diff --git a/tests/testthat/test-stage1.R b/tests/testthat/test-stage1.R index 439e2c0..a1aac45 100644 --- a/tests/testthat/test-stage1.R +++ b/tests/testthat/test-stage1.R @@ -29,7 +29,9 @@ test_that('taxise_run() works', { phylotaR:::cleanup(wd) test_that('txids_get() works', { mock_search <- function(...) { - list('count' = 100, 'ids' = as.character(1:100)) + res <- list('count' = 100, 'ids' = as.character(1:100)) + class(res) <- 'esearch' + res } phylotaR:::cache_setup(ps) res <- with_mock( diff --git a/tests/testthat/test-tools-blast.R b/tests/testthat/test-tools-blast.R index ae04ca5..e95681a 100644 --- a/tests/testthat/test-tools-blast.R +++ b/tests/testthat/test-tools-blast.R @@ -32,7 +32,7 @@ test_that('blastn_run() works', { test_that('outfmt_get() works', { res <- with_mock( `phylotaR:::blastdb_gen` = function(...) 0, - `phylotaR:::blastn_run` = function(...) 0, + `phylotaR:::cmdln` = function(...) 0, phylotaR:::outfmt_get(ps = ps) ) expect_true(inherits(res, 'character')) diff --git a/tests/testthat/test-tools-entrez.R b/tests/testthat/test-tools-entrez.R index 36bba84..56d1755 100644 --- a/tests/testthat/test-tools-entrez.R +++ b/tests/testthat/test-tools-entrez.R @@ -14,7 +14,9 @@ esearch_mock <- function(db, term, retmax, retstart, ...) { } else { ids <- as.character(1:n) } - list('ids' = ids, 'count' = n) + res <- list('ids' = ids, 'count' = n) + class(res) <- 'esearch' + res } efetch_mock <- function(retmax, ...) { # when rettype == 'acc' diff --git a/tests/testthat/test-tools-pipeline.R b/tests/testthat/test-tools-pipeline.R index 2f2d77c..e35dd2d 100644 --- a/tests/testthat/test-tools-pipeline.R +++ b/tests/testthat/test-tools-pipeline.R @@ -35,7 +35,7 @@ test_that('parameters_setup() works', { phylotaR:::parameters_setup(wd = wd, txid = 9606, ncbi_execs = ncbi_execs) ) ps <- phylotaR:::parameters_load(wd = wd) - expect_true(length(ps) == 21) + expect_true(length(ps) == 22) }) phylotaR:::cleanup(wd) test_that('stage_args_check() works', {