Skip to contents

Populates the supplied session variable for testing.

Usage

DM_test_mksession(session = list())

Arguments

session

Shiny session variable (in app) or a list (outside of app)

Value

The DM portion of the `all_sess_res` returned from FM_app_preload

Examples

session = shiny::MockShinySession$new()
sess_res = DM_test_mksession(session=session)
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → ASM:   dest:   file.path("config","report.docx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → ASM:   dest:   file.path("config","report.pptx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → ASM:   dest:   file.path("config","report.yaml")
#> → ASM: State initialized
#> → ASM: setting word placeholders: 
#> → ASM:   -> setting docx ph: HEADERLEFT = left header
#> → ASM:   -> setting docx ph: HEADERRIGHT = right header
#> → ASM:   -> setting docx ph: FOOTERLEFT = left footer
#> → ASM: module isgood: TRUE
#> → DM: module checksum updated: f280116ab6b4488df6de76aff513a83f
#> → DM: State initialized
#> → DM: ds checksum updated: 641fcbc6616d24d05acded4317a3bb12
#> → DM: module checksum updated: 78099100dae67cc0fee50517ea72a920
#> → DM: adding preload sources
#> → DM:  - file added: TEST_DATA.xlsx
#> → DM: added: TEST_DATA.xlsx
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_PC.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_PC.csv
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_EX.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_EX.csv
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_DM.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_DM.csv
#> → DM: loading element idx: 1
#> → DM: ds checksum updated: 60765891025b7d02658a5d3ef44b7d0f
#> → DM: module checksum updated: e32fd7207ad0ac2a5acf2ef42ab50387
#> → DM: added element idx: 1
#> → DM: loading element idx: 2
#> → DM: ds checksum updated: 69177f309a13f4ecb2001e2a840b5924
#> → DM: module checksum updated: b31fbb225e9dc8b140fdfd7bb74e424a
#> → DM: added element idx: 2
#> → DM: loading element idx: 3
#> → DM: ds checksum updated: 96774f4b387ca96e3e2e891d87a9c9a6
#> → DM: module checksum updated: e2bec67e4685ee49fd475b06c2675cc6
#> → DM: added element idx: 3
#> → DM: loading element idx: 4
#> → DM: ds checksum updated: a64044314704ea6451554162dd43c022
#> → DM: module checksum updated: cac579c8a237a419a4dbf90d784dc375
#> → DM: added element idx: 4
#> → DM: module isgood: TRUE
#> → # preload_complete is good: TRUE ------------------------------------------