trustpoint.tests.test_views.test_list_in_detail_view

Tests for the ListInDetailView class.

Classes

TestListInDetailView

Test cases for ListInDetailView using existing models.

Module Contents

class trustpoint.tests.test_views.test_list_in_detail_view.TestListInDetailView(methodName='runTest')[source]

Bases: django.test.TestCase

Test cases for ListInDetailView using existing models.

classmethod setUpTestData()[source]

Set up test data shared across all test methods.

Return type:

None

setUp()[source]

Set up instance-specific data.

Return type:

None

test_get_object_success()[source]

Test that get_object retrieves the correct DeviceModel instance.

Return type:

None

test_get_object_invalid_pk()[source]

Test get_object raises Http404 for nonexistent DeviceModel instance (invalid pk).

Return type:

None

test_get_context_data_with_children()[source]

Test that context contains both the parent object and the child list.

Return type:

None

test_get_object_missing_pk()[source]

Ensure get_object raises AttributeError when pk is missing.

Return type:

None

test_context_data_without_children()[source]

Test context when no children exist for the parent.

Return type:

None