mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 06:15:45 +00:00
adding initial tests
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user