shared.tests.test_templatetagsΒΆ

Test cases for template tags in the shared application.

ClassesΒΆ

TestUrlSortTag

Test cases for the url_sort template tag.

TestSortIconFilter

Test cases for the sort_icon template filter.

Module ContentsΒΆ

class shared.tests.test_templatetags.TestUrlSortTag(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for the url_sort template tag.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_url_sort_add_field_ascending()[source]ΒΆ

Test url_sort adds a field in ascending order when not present.

Return type:

None

test_url_sort_toggle_to_ascending()[source]ΒΆ

Test url_sort toggles from descending to ascending.

Return type:

None

test_url_sort_toggle_to_descending()[source]ΒΆ

Test url_sort toggles from ascending to descending.

Return type:

None

test_url_sort_preserves_other_sort_fields()[source]ΒΆ

Test url_sort preserves other sort fields in the querystring.

Return type:

None

test_url_sort_removes_existing_field_when_toggling()[source]ΒΆ

Test url_sort removes existing field occurrence when toggling.

Return type:

None

test_url_sort_with_multiple_fields_descending()[source]ΒΆ

Test url_sort with multiple fields, toggling one from descending.

Return type:

None

test_url_sort_with_empty_querystring()[source]ΒΆ

Test url_sort with no existing sort parameters.

Return type:

None

test_url_sort_preserves_non_sort_params()[source]ΒΆ

Test url_sort preserves non-sort query parameters.

Return type:

None

test_url_sort_with_complex_field_name()[source]ΒΆ

Test url_sort with field names containing underscores.

Return type:

None

test_url_sort_toggle_complex_field()[source]ΒΆ

Test url_sort toggling field with underscores.

Return type:

None

test_url_sort_with_multiple_toggles()[source]ΒΆ

Test url_sort behavior with multiple fields being toggled.

Return type:

None

test_url_sort_ordering_priority()[source]ΒΆ

Test url_sort places toggled field first in the querystring.

Return type:

None

class shared.tests.test_templatetags.TestSortIconFilter(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for the sort_icon template filter.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_sort_icon_ascending()[source]ΒΆ

Test sort_icon returns up arrow for ascending sort.

Return type:

None

test_sort_icon_descending()[source]ΒΆ

Test sort_icon returns down arrow for descending sort.

Return type:

None

test_sort_icon_no_sort()[source]ΒΆ

Test sort_icon returns up arrow when field is not sorted.

Return type:

None

test_sort_icon_different_field_sorted()[source]ΒΆ

Test sort_icon returns up arrow when a different field is sorted.

Return type:

None

test_sort_icon_multiple_fields_ascending()[source]ΒΆ

Test sort_icon with multiple fields, target field ascending.

Return type:

None

test_sort_icon_multiple_fields_descending()[source]ΒΆ

Test sort_icon with multiple fields, target field descending.

Return type:

None

test_sort_icon_complex_field_name()[source]ΒΆ

Test sort_icon with field names containing underscores.

Return type:

None

test_sort_icon_partial_field_name_match()[source]ΒΆ

Test sort_icon does not match partial field names.

Return type:

None

test_sort_icon_with_special_characters()[source]ΒΆ

Test sort_icon with field names that might have special chars.

Return type:

None

test_sort_icon_empty_sort_list()[source]ΒΆ

Test sort_icon with empty sort parameter.

Return type:

None