STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
backend.test_runs Namespace Reference

Functions

 elodin_dir (tmp_path, monkeypatch)
 test_lists_real_and_simulated_runs (elodin_dir)
 test_ignores_ad_hoc_and_hand_named_dirs (elodin_dir)
 test_sorted_newest_first (elodin_dir)
 test_run_id_pattern_rejects_path_traversal ()

Detailed Description

Unit tests for run discovery (no elodin-db / real run needed).

Run: cd webviewer && .venv/bin/python -m pytest backend/test_runs.py -q

Function Documentation

◆ elodin_dir()

backend.test_runs.elodin_dir ( tmp_path,
monkeypatch )
Point the backend at an empty fake ELODIN_DIR with the cache stubbed out.

Definition at line 12 of file test_runs.py.

◆ test_ignores_ad_hoc_and_hand_named_dirs()

backend.test_runs.test_ignores_ad_hoc_and_hand_named_dirs ( elodin_dir)

Definition at line 33 of file test_runs.py.

◆ test_lists_real_and_simulated_runs()

backend.test_runs.test_lists_real_and_simulated_runs ( elodin_dir)

Definition at line 19 of file test_runs.py.

◆ test_run_id_pattern_rejects_path_traversal()

backend.test_runs.test_run_id_pattern_rejects_path_traversal ( )

Definition at line 67 of file test_runs.py.

◆ test_sorted_newest_first()

backend.test_runs.test_sorted_newest_first ( elodin_dir)

Definition at line 52 of file test_runs.py.