/
vshmidt
/
django
Обзор
Документация
Войти
/
vshmidt
/
django
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/forms_tests/widget_tests/test_input.py
23 строки
722 B
django-bot
Refs #33476 -- Reformatted code with Black.
07 фев 2022, 22:37
07 фев 2022, 22:37
9c19aff
Код
Авторство
О чём код?
from django.forms.widgets import Input from .base import WidgetTest class InputTests(WidgetTest): def test_attrs_with_type(self): attrs = {"type": "date"} widget = Input(attrs) self.check_html( widget, "name", "value", '<input type="date" name="name" value="value">' ) # reuse the same attrs for another widget self.check_html( Input(attrs), "name", "value", '<input type="date" name="name" value="value">', ) attrs["type"] = "number" # shouldn't change the widget type self.check_html( widget, "name", "value", '<input type="date" name="name" value="value">' )