Commit d368b856 authored by Petar Horki's avatar Petar Horki

(Note: this comment refers to the previous commit)feat:...

(Note: this comment refers to the previous commit)feat: DataModel.SynpuffConditionTestData, DataModel.SynpuffMeasurementTestData, Factory.DataPackage, DataGroupClosure; test: RenderCohortCondition, DataModel.SynpuffConditionTestData, calling AggConceptIDsByDomainID with/without parameters
parent cf262bdf
......@@ -2602,46 +2602,44 @@ test_that("calling AggConceptIDsByDomainID without parameters is equal to callin
myNoParamDF["Measurement" == myDF[`_DF_DATA_GROUP_DOMAIN_NAME`], ]$aggConceptIDs)
})
# UNCOMMENT ME BEGIN
# #====================================================================
#
# test_that("cohorts can be set from external file in folder", {
# # read WebAPI url from config file
# myFilePath = file.path("../..", "inst", "config.yml")
#
# myWebApiParams <- config::get(file = myFilePath, "WebAPI")
#
# baseUrl <- myWebApiParams$baseURL
#
# jsonFilePath <- file.path("../..", "inst", "json", "deploy_test-cohort.json")
#
# # upload json file directly from folder
# post <- SetCohortsFromFile(jsonFilePath=jsonFilePath, baseUrl=baseUrl)
#
# message <- httr::http_status(post)$message
# # check http status if uploading was successfull
# expect_that(message, equals("Success: (200) OK"))
#
# })
#
# #====================================================================
#
# test_that("cohorts can be set from variable", {
# # read WebAPI url from config file
# myFilePath = file.path("../..", "inst", "config.yml")
#
# myWebApiParams <- config::get(file = myFilePath, "WebAPI")
#
# baseUrl <- myWebApiParams$baseURL
#
# jsonFilePath <- file.path("../..", "inst", "json", "deploy_test-cohort.json")
#
# jsonFile <- jsonlite::fromJSON(jsonFilePath)
#
# post <- SetCohortsFromVariable(jsonFile=jsonFile, baseUrl=baseUrl)
#
# message <- httr::http_status(post)$message
#
# expect_that(message, equals("Success: (200) OK"))
# })
# UNCOMMENT ME END
#====================================================================
test_that("cohorts can be set from external file in folder", {
# read WebAPI url from config file
myFilePath = file.path("../..", "inst", "config.yml")
myWebApiParams <- config::get(file = myFilePath, "WebAPI")
baseUrl <- myWebApiParams$baseURL
jsonFilePath <- file.path("../..", "inst", "json", "deploy_test-cohort.json")
# upload json file directly from folder
post <- SetCohortsFromFile(jsonFilePath=jsonFilePath, baseUrl=baseUrl)
message <- httr::http_status(post)$message
# check http status if uploading was successfull
expect_that(message, equals("Success: (200) OK"))
})
#====================================================================
test_that("cohorts can be set from variable", {
# read WebAPI url from config file
myFilePath = file.path("../..", "inst", "config.yml")
myWebApiParams <- config::get(file = myFilePath, "WebAPI")
baseUrl <- myWebApiParams$baseURL
jsonFilePath <- file.path("../..", "inst", "json", "deploy_test-cohort.json")
jsonFile <- jsonlite::fromJSON(jsonFilePath)
post <- SetCohortsFromVariable(jsonFile=jsonFile, baseUrl=baseUrl)
message <- httr::http_status(post)$message
expect_that(message, equals("Success: (200) OK"))
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment