File: 001_ping_demo.py

package info (click to toggle)
python-django-crispy-forms-foundation 1.1.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 880 kB
  • sloc: javascript: 6,437; python: 1,326; makefile: 200; sh: 17
file content (23 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""
Some dummy pinging to ensure demo urls are consistent

WARNING: Keep this synchronized with enabled urls files
"""
import pytest

from django.urls import reverse


@pytest.mark.parametrize("url_name,url_args,url_kwargs", [
    ("home", [], {}),
    ("demo:crispy-demo-form-fieldsets", [], {"foundation_version": 6}),
    ("demo:crispy-demo-form-tabs", [], {"foundation_version": 6}),
    ("demo:crispy-demo-form-accordions", [], {"foundation_version": 6}),
    ("demo:crispy-demo-success", [], {"foundation_version": 6}),
])
def test_ping_reverse_urlname(client, url_name, url_args, url_kwargs):
    """
    Ping reversed url names
    """
    response = client.get(reverse(url_name, args=url_args, kwargs=url_kwargs))
    assert response.status_code == 200