~crocmagnon/blog

ref: efdbc21ea7568ad72e322cbbc6697a943ac9c9cc blog/articles/tests/test_admin.py -rw-r--r-- 369 bytes
efdbc21eGabriel Augendre Configure pytest to automatically rerun a flaky test 17 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
import pytest
from django.test import Client
from django.urls import reverse

from articles.models import User


@pytest.mark.django_db
@pytest.mark.flaky(reruns=5, reruns_delay=3)
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