This commit is contained in:
parent
973988c91e
commit
e90a60e882
2 changed files with 3 additions and 6 deletions
|
@ -15,16 +15,12 @@ def origin():
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def organization(origin):
|
def organization(origin):
|
||||||
return Organization.objects.create(
|
return Organization.objects.create(name="Test Org", origin=origin)
|
||||||
name="Test Org", namespace="test-org", origin=origin
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def other_organization(origin):
|
def other_organization(origin):
|
||||||
return Organization.objects.create(
|
return Organization.objects.create(name="Test Org Alternate", origin=origin)
|
||||||
name="Test Org Alternate", namespace="test-org-alternate", origin=origin
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -23,6 +23,7 @@ def test_root_view_invalid_urls_404(client):
|
||||||
def test_owner_can_access_dashboard(client, org_owner, organization):
|
def test_owner_can_access_dashboard(client, org_owner, organization):
|
||||||
client.force_login(org_owner)
|
client.force_login(org_owner)
|
||||||
response = client.get(organization.urls.base)
|
response = client.get(organization.urls.base)
|
||||||
|
assert organization.namespace == f"org-{organization.pk}"
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert organization.name in response.content.decode()
|
assert organization.name in response.content.decode()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue