Files
applepy/tests/test_deck_export.py
Warezpeddler 3325436017 Initial commit
2026-04-25 23:09:31 +01:00

25 lines
931 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Presentation exportaligned checks (reference path and portable pieces)."""
from pathlib import Path
import pytest
from applepy.checks.deck_export import check_deck_export_reference, check_kube_config_presence
from applepy.context import RunContext
def test_deck_reference_finds_export(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.chdir(tmp_path)
name = "APPLEPY_DECK_REFERENCE.txt"
(tmp_path / name).write_text("stub export\n", encoding="utf-8")
ctx = RunContext(home=tmp_path, output_dir=tmp_path, phase="unprivileged")
out = check_deck_export_reference(ctx)
assert len(out) == 1
assert out[0].id == "deck-000"
assert "located" in out[0].title.lower()
def test_kube_config_absent(tmp_path: Path) -> None:
ctx = RunContext(home=tmp_path, output_dir=tmp_path, phase="unprivileged")
out = check_kube_config_presence(ctx)
assert out[0].id == "deck-104"