RequiresCognos
from skipcheck_tm1_testcontainers import RequiresCognosRuns a test class or method that needs IBM Cognos Analytics (CAM security) as well as TM1, and skips it when either isn't available.
It includes RequiresTm1, so tests also skip without Docker or a
Tm1Source. Declare a CognosSource parameter to get the source
CognosSource.discover found. Cognos takes minutes to start and its test users
vary by test, so there's no shared Cognos: build a CognosContainer with the
users the test needs.
@pytest.mark.requires_cognos
def test_readers_can_only_read(cognos: CognosSource) -> None:
# No shared Cognos: each test starts its own, with the users it needs
with CognosContainer(cognos).with_user("viewer", "viewerpw", "Readers"):
...
Members
NO_SOURCE_MESSAGE static | Why tests skip when no Cognos source is configured, and what to set. |
mark property |
NO_SOURCE_MESSAGE
staticNO_SOURCE_MESSAGEWhy tests skip when no Cognos source is configured, and what to set.
mark
propertymark