Files
obsidian-metadata/tests/application_test.py
Nathaniel Landau b7735760e9 test: add tests for Application class
Need more attention here. Very difficult to test the keyboard interaction with questionary. Going to try using pexpect soon to hopefully add better coverage.
2023-01-23 00:31:08 +00:00

19 lines
534 B
Python

# type: ignore
"""Tests for the application module."""
from obsidian_metadata._config import Config
from obsidian_metadata.models.application import Application
def test_load_vault(test_vault) -> None:
"""Test application."""
vault_path = test_vault
config = Config(config_path="tests/fixtures/test_vault_config.toml", vault_path=vault_path)
app = Application(config=config, dry_run=False)
app.load_vault()
assert app.dry_run is False
assert app.config == config
assert app.vault.num_notes() == 2