import pytest @pytest.fixture def valid_env(tmp_path): ca_file = tmp_path / "ca.pem" ca_file.write_text("test ca") return { "SECRET_KEY": "x" * 48, "ALLOWED_HOSTS": "testserver", "DATA_DIR": str(tmp_path), "LDAP_SERVER": "dc.example.test", "LDAP_USER_OU_DN": "OU=Users,DC=example,DC=test", "LDAP_BIND_DN": "svc@example.test", "LDAP_BIND_PASSWORD": "service-password", "LDAP_CA_FILE": str(ca_file), "LDAP_PUBLISHER_GROUP_DN": "CN=Publishers,OU=Users,DC=example,DC=test", "LDAP_ADMIN_GROUP_DN": "CN=Admins,OU=Users,DC=example,DC=test", }