Skip to content

Commit

Permalink
freeze time to make tests more predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Mar 9, 2024
1 parent 83a0b92 commit 957f29f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ca/django_ca/tests/commands/test_view_ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
from django.conf import settings
from django.test import TestCase

from freezegun import freeze_time

from django_ca.tests.base.constants import TIMESTAMPS
from django_ca.tests.base.mixins import TestCaseMixin
from django_ca.tests.base.utils import cmd, issuer_alternative_name, override_tmpcadir, uri
from django_ca.utils import format_general_name
Expand Down Expand Up @@ -1091,7 +1094,7 @@
* commonName (CN): GlobalSign Root CA
* Valid from: {valid_from_str}
* Valid until: {valid_until_str}
* Status: Expired
* Status: Valid
Certificate Authority information:
* Certificate authority is a root CA.
Expand Down Expand Up @@ -1696,6 +1699,7 @@
expected["pwd"] = expected["ec"]


@freeze_time(TIMESTAMPS["everything_valid"])
class ViewCATestCase(TestCaseMixin, TestCase):
"""Main test class for this command."""

Expand Down

0 comments on commit 957f29f

Please sign in to comment.