schickmacher/schickmacher/renderer/tests/test_views.py
2019-09-05 12:20:45 +02:00

15 lines
397 B
Python

import pytest
from django.test import Client
from django.utils import timezone
pytestmark = pytest.mark.django_db
class TestRendererFormView:
def test_get_empty_form(self, client: Client):
response = client.get('/renderer/')
assert response.status_code == 200
assert response.context['form']['date'].value() \
== timezone.now().strftime('%Y-%m-%d')