Changeset 2f650ac in flexoentity for tests


Ignore:
Timestamp:
10/22/25 14:22:21 (3 months ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
master
Children:
3d16c35
Parents:
859e2b1
Message:

add domain as entity

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/conftest.py

    r859e2b1 r2f650ac  
    33import pytest
    44import json
    5 from flexoentity import FlexoEntity, EntityType, EntityState
     5from flexoentity import FlexoEntity, EntityType, EntityState, Domain
    66
    77
     
    3434    """Generic FlexoEntity-like instance in draft state."""
    3535    return DummyEntity(
    36         domain="AF",
     36        domain=Domain(domain="SIG", etype=EntityType.DOMAIN, state=EntityState.DRAFT, fullname="Signal Corps", classification="RESTRICTED"),
    3737        etype=EntityType.CATALOG,
    3838        state=EntityState.DRAFT,
  • tests/test_id_stress.py

    r859e2b1 r2f650ac  
    66import random
    77
    8 from flexoentity import FlexOID, EntityType, EntityState
     8from flexoentity import FlexOID, EntityType, EntityState, Domain
    99
    1010from tests.conftest import DummyEntity
     
    1313def test_bulk_generation_uniqueness():
    1414    """Generate 10,000 IDs and assert uniqueness (statistical test)."""
    15     domain = "AF"
     15    domain = Domain(domain="SIG", etype=EntityType.DOMAIN, state=EntityState.DRAFT,
     16                    fullname="Signal Corps", classification="RESTRICTED", owner="MESE")
     17
    1618    etype = EntityType.QUESTION
    1719    estate = EntityState.DRAFT
     
    4446    should yield the same base ID (without suffix).
    4547    """
    46     domain = "AF"
     48    domain = Domain(domain="SIG", etype=EntityType.DOMAIN, state=EntityState.DRAFT,
     49                    fullname="Signal Corps", classification="RESTRICTED")
    4750    etype = EntityType.CATALOG
    4851    estate = EntityState.DRAFT
Note: See TracChangeset for help on using the changeset viewer.