Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mesemus committed Dec 17, 2023
1 parent 1facf1c commit 1995282
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/test_ui/test_ui_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@
def test_draft_publish_request_present(
app, record_ui_resource, example_topic_draft, client_with_login, fake_manifest
):
def check_request(ctext):
assert "publish_draft:" in ctext
assert "type': 'publish_draft'" in ctext
assert "'status': 'created'" in ctext
assert "'receiver': None" in ctext
assert "'actions': ['submit']" in ctext

with client_with_login.get(f"/thesis/{example_topic_draft['id']}/edit") as c:
assert c.status_code == 200
data = json.loads(c.text)
assert data["available_requests"]["publish_draft"] == {'actions': allowed_actions, 'receiver': None, 'status': 'created', 'type': 'publish_draft'}
assert data["form_config"]["publish_draft"] == {'actions': ['submit', 'delete'], 'receiver': None, 'status': 'created', 'type': 'publish_draft'}
assert data["form_config"]["publish_draft"] == {'actions': allowed_actions, 'receiver': None, 'status': 'created', 'type': 'publish_draft'}


def test_draft_publish_unauthorized(
Expand Down

0 comments on commit 1995282

Please sign in to comment.