from pathlib import Path

def test_enterprise_console_exists():
    text=Path('app/static/enterprise.html').read_text(encoding='utf-8')
    assert '/enterprise/query/execute' in text
    assert '/enterprise/access-requests' in text
    assert '/enterprise/quality/' in text

def test_enterprise_routes_registered():
    text=Path('app/main.py').read_text(encoding='utf-8')
    assert 'enterprise_router' in text
    assert "version='0.30.0'" in text

def test_security_features_present():
    entities=Path('app/models/entities.py').read_text(encoding='utf-8')
    for name in ['DatasetPermission','DataAccessRequest','DataCatalogEntry','DataLineage','DataQualityRule','Notification']:
        assert f'class {name}' in entities
