Skip to content

Commit

Permalink
?
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Jan 6, 2025
1 parent 7d4b22f commit 6b3bbbe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckanext/announcements/tests/test_ui.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from types import SimpleNamespace
import pytest
from ckan.plugins import toolkit
from ckanext.announcements.tests import factories


Expand All @@ -26,4 +27,9 @@ def test_sysadmin_user(self, app, an_data):
environ = {"Authorization": an_data.sysadmin["token"]}

resp = app.get("/ckan-admin/announcements", headers=environ)
assert resp.status_code == 200, f'Expected 200, got {resp.status_code}\n\t{environ}\n\t{resp.body}\n\t{an_data.sysadmin}'
athn = toolkit.config.get("apitoken_header_name")
err = (
f'Expected 200, got {resp.status_code}\n\t{athn}'
f'\n\t{environ}\n\t{resp.body}\n\t{an_data.sysadmin}'
)
assert resp.status_code == 200, err

0 comments on commit 6b3bbbe

Please sign in to comment.