Skip to content

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DR0P-database committed Nov 30, 2024
1 parent 3cecc47 commit 6c13bf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def unreviewed_comment(dbsession, lecturer):


@pytest.fixture
def comment_update(dbsession, lecturer):
def nonanonymous_comment(dbsession, lecturer):
_comment = Comment(
subject="update_subject",
text="update_comment",
subject="subject",
text="omment",
mark_kindness=1,
mark_clarity=1,
mark_freebie=1,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_routes/test_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ def test_review_comment(client, dbsession, unreviewed_comment, comment, review_s
),
],
)
def test_update_comment(client, dbsession, comment_update, body, response_status):
response = client.patch(f"{url}/{comment_update.uuid}", json=body)
def test_update_comment(client, dbsession, nonanonymous_comment, body, response_status):
response = client.patch(f"{url}/{nonanonymous_comment.uuid}", json=body)
assert response.status_code == response_status
if response.status_code == status.HTTP_200_OK:
dbsession.refresh(comment_update)
assert comment_update.review_status == ReviewStatus.PENDING
dbsession.refresh(nonanonymous_comment)
assert nonanonymous_comment.review_status == ReviewStatus.PENDING


def test_delete_comment(client, dbsession, comment):
Expand Down

0 comments on commit 6c13bf8

Please sign in to comment.