mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 13:15:44 +00:00
32 lines
826 B
Python
32 lines
826 B
Python
import pytest
|
|
|
|
from tembo.journal.pages import PageCreator
|
|
|
|
|
|
def test_page_creator_convert_to_path_missing_base_path(caplog):
|
|
# arrange
|
|
base_path = "/some/nonexistent/path"
|
|
page_path = "some_page"
|
|
filename = "some_filename"
|
|
extension = "some_extension"
|
|
|
|
# act
|
|
with pytest.raises(SystemExit) as system_exit:
|
|
PageCreator._convert_to_path(
|
|
base_path=base_path, page_path=page_path, filename=filename, extension=extension
|
|
)
|
|
|
|
# assert
|
|
assert system_exit.value.code == 1
|
|
assert caplog.records[0].levelname == "CRITICAL"
|
|
assert caplog.records[0].message == "Tembo base path of /some/nonexistent/path does not exist - exiting"
|
|
|
|
# @pytest.mark.parametrize([])
|
|
def test_page_creator_convert_to_path(shared_datadir):
|
|
# arrange
|
|
|
|
# act
|
|
|
|
# assert
|
|
pass
|