mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Mark flaky tests on database handler tests on PyPy runtime
The database handler tests fail from time to time due to slow PyPy startup time which results in tests failing unexpectedly which only happens on PyPy. This PR requires CPython runtime to pass the tests and indicates failures, but does not fail the test suite due to them.
This commit is contained in:
parent
f6e6d32672
commit
69af352d6e
1 changed files with 4 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
from platform import python_implementation
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from pytest import mark
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.test import override_settings
|
||||
from django.urls import reverse
|
||||
|
|
@ -206,6 +209,7 @@ class ResetAttemptsTestCase(AxesHandlerBaseTestCase):
|
|||
AXES_COOLOFF_TIME=timedelta(seconds=2),
|
||||
AXES_RESET_ON_SUCCESS=True,
|
||||
)
|
||||
@mark.xfail(python_implementation() == "PyPy", reason="PyPy implementation is flaky for this test", strict=False)
|
||||
class AxesDatabaseHandlerTestCase(AxesHandlerBaseTestCase):
|
||||
def test_handler_reset_attempts(self):
|
||||
self.create_attempt()
|
||||
|
|
|
|||
Loading…
Reference in a new issue