~crocmagnon/blog

ref: 29bace4395eb82a5f95285de2a4f1ccf95d7f4a2 blog/articles/tests/test_admin.py -rw-r--r-- 324 bytes
29bace43Gabriel Augendre Update run.sh 17 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
import pytest
from django.test import Client
from django.urls import reverse

from articles.models import User


@pytest.mark.django_db
def test_can_access_add_article(client: Client, author: User):
    client.force_login(author)
    res = client.get(reverse("admin:articles_article_add"))
    assert res.status_code == 200