Test namespace generation
All checks were successful
Tests / test (push) Successful in 23s

This commit is contained in:
Tobias Kunze 2025-04-09 16:06:45 +02:00
parent 973988c91e
commit e90a60e882
2 changed files with 3 additions and 6 deletions

View file

@ -15,16 +15,12 @@ def origin():
@pytest.fixture
def organization(origin):
return Organization.objects.create(
name="Test Org", namespace="test-org", origin=origin
)
return Organization.objects.create(name="Test Org", origin=origin)
@pytest.fixture
def other_organization(origin):
return Organization.objects.create(
name="Test Org Alternate", namespace="test-org-alternate", origin=origin
)
return Organization.objects.create(name="Test Org Alternate", origin=origin)
@pytest.fixture

View file

@ -23,6 +23,7 @@ def test_root_view_invalid_urls_404(client):
def test_owner_can_access_dashboard(client, org_owner, organization):
client.force_login(org_owner)
response = client.get(organization.urls.base)
assert organization.namespace == f"org-{organization.pk}"
assert response.status_code == 200
assert organization.name in response.content.decode()