Skip to content

Commit e5337be

Browse files
committed
test_unauthorized_get_all_posts
1 parent a3e360f commit e5337be

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_posts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ def test_get_all_posts(authorized_client, add_fake_posts):
2525
assert post.created_at == dbpost.created_at
2626
assert post.owner_id == dbpost.owner_id
2727

28-
28+
def test_unauthorized_get_all_posts(client, add_fake_posts):
29+
response = client.get('/posts')
30+
assert response.status_code == 401
31+

0 commit comments

Comments
 (0)