Skip to content

Commit

Permalink
Added more test return types
Browse files Browse the repository at this point in the history
  • Loading branch information
smithdc1 committed Dec 29, 2022
1 parent 83f82db commit d32e765
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, *args, **kwargs):
assert extra in rendered


def test_contains_partial():
def test_contains_partial() -> None:
c = SimpleTestCase()
needle = "<span></span>"
html = "<form>%s</form>"
Expand Down Expand Up @@ -87,14 +87,14 @@ def test_contains_partial():
c.assertTrue(contains_partial(html, needle, ignore_needle_children=True))


def test_parse_expected_and_form():
def test_parse_expected_and_form() -> None:
form = SampleForm()
form.helper = FormHelper()
form.helper.layout = Layout("is_company")
assert parse_form(form) == parse_expected("utils_test.html")


def test_optgroup_filter_nested():
def test_optgroup_filter_nested() -> None:
form = GroupedChoiceForm({"checkbox_select_multiple": ["cd", "vhs"]})
form.as_p()
groups = optgroups(form["checkbox_select_multiple"])
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_optgroup_filter_nested():
assert index == 2


def test_optgroup_filter():
def test_optgroup_filter() -> None:
form = SampleForm5({"checkbox_select_multiple": "1"})
groups = optgroups(form["checkbox_select_multiple"])
group = groups[0]
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_optgroup_filter():


@override_settings()
def test_get_template_pack():
def test_get_template_pack() -> None:
del settings.CRISPY_TEMPLATE_PACK
with pytest.raises(AttributeError):
get_template_pack()
Expand Down

0 comments on commit d32e765

Please sign in to comment.