mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 13:21:50 +02:00
small fixes
This commit is contained in:
@ -1,20 +1,22 @@
|
||||
context("atc.R")
|
||||
|
||||
test_that("atc_property works", {
|
||||
expect_equal(tolower(atc_property("J01CA04", property = "Name")), "amoxicillin")
|
||||
expect_equal(atc_property("J01CA04", property = "unit"), "g")
|
||||
if (!is.null(curl::nslookup("www.whocc.no", error = FALSE))) {
|
||||
expect_equal(tolower(atc_property("J01CA04", property = "Name")), "amoxicillin")
|
||||
expect_equal(atc_property("J01CA04", property = "unit"), "g")
|
||||
|
||||
expect_equal(atc_property("J01CA04", property = "DDD"),
|
||||
atc_ddd("J01CA04"))
|
||||
expect_equal(atc_property("J01CA04", property = "DDD"),
|
||||
atc_ddd("J01CA04"))
|
||||
|
||||
expect_identical(atc_property("J01CA04", property = "Groups"),
|
||||
atc_groups("J01CA04"))
|
||||
expect_identical(atc_property("J01CA04", property = "Groups"),
|
||||
atc_groups("J01CA04"))
|
||||
|
||||
expect_warning(atc_property("ABCDEFG", property = "DDD"))
|
||||
expect_warning(atc_property("ABCDEFG", property = "DDD"))
|
||||
|
||||
expect_error(atc_property("J01CA04", property = c(1:5)))
|
||||
expect_error(atc_property("J01CA04", property = "test"))
|
||||
expect_error(atc_property("J01CA04", property = "test", administration = c(1:5)))
|
||||
expect_error(atc_property("J01CA04", property = c(1:5)))
|
||||
expect_error(atc_property("J01CA04", property = "test"))
|
||||
expect_error(atc_property("J01CA04", property = "test", administration = c(1:5)))
|
||||
}
|
||||
})
|
||||
|
||||
test_that("abname works", {
|
||||
|
@ -86,7 +86,7 @@ test_that("prediction of rsi works", {
|
||||
col_date = "date",
|
||||
minimum = 10,
|
||||
info = TRUE) %>%
|
||||
pull("resistance")
|
||||
pull("value")
|
||||
# amox resistance will increase according to data set `septic_patients`
|
||||
expect_true(amox_R[3] < amox_R[20])
|
||||
|
||||
|
Reference in New Issue
Block a user