All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m11s
- Run tests for all 10 services via per-service pytest subprocesses - Group results by service with section headers - Clickable summary cards filter by outcome (passed/failed/errors/skipped) - Service filter nav using ~nav-link buttons in menu bar - Full menu integration: ~header-row + ~header-child + ~menu-row - Show logo image via cart-mini rendering - Mount full service directories in docker-compose for test access - Add 24 unit test files across 9 services Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
60 lines
1.2 KiB
Python
60 lines
1.2 KiB
Python
"""Unit tests for slot helper functions."""
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from events.bp.calendar.services.slots import _b
|
|
|
|
|
|
class TestBoolParse:
|
|
def test_true_bool(self):
|
|
assert _b(True) is True
|
|
|
|
def test_false_bool(self):
|
|
assert _b(False) is False
|
|
|
|
def test_string_true(self):
|
|
assert _b("true") is True
|
|
|
|
def test_string_True(self):
|
|
assert _b("True") is True
|
|
|
|
def test_string_1(self):
|
|
assert _b("1") is True
|
|
|
|
def test_string_yes(self):
|
|
assert _b("yes") is True
|
|
|
|
def test_string_y(self):
|
|
assert _b("y") is True
|
|
|
|
def test_string_t(self):
|
|
assert _b("t") is True
|
|
|
|
def test_string_on(self):
|
|
assert _b("on") is True
|
|
|
|
def test_string_false(self):
|
|
assert _b("false") is False
|
|
|
|
def test_string_0(self):
|
|
assert _b("0") is False
|
|
|
|
def test_string_no(self):
|
|
assert _b("no") is False
|
|
|
|
def test_string_off(self):
|
|
assert _b("off") is False
|
|
|
|
def test_string_empty(self):
|
|
assert _b("") is False
|
|
|
|
def test_int_1(self):
|
|
assert _b(1) is True
|
|
|
|
def test_int_0(self):
|
|
assert _b(0) is False
|
|
|
|
def test_random_string(self):
|
|
assert _b("maybe") is False
|