trustpoint.tests.test_views.test_bulk_deleteΒΆ

Tests for the BulkDeleteView and related classes.

ClassesΒΆ

TestPrimaryKeyListFromPrimaryKeyString

Test cases for PrimaryKeyListFromPrimaryKeyString.

TestPrimaryKeyQuerysetFromUrlMixin

Test cases for PrimaryKeyQuerysetFromUrlMixin.

TestBaseBulkDeleteView

Test cases for BaseBulkDeleteView.

TestBulkDeleteView

Test cases for BulkDeleteView.

Module ContentsΒΆ

class trustpoint.tests.test_views.test_bulk_delete.TestPrimaryKeyListFromPrimaryKeyString(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for PrimaryKeyListFromPrimaryKeyString.

test_get_pks_as_list_single_pk()[source]ΒΆ

Test parsing a single primary key.

Return type:

None

test_get_pks_as_list_multiple_pks()[source]ΒΆ

Test parsing multiple primary keys.

Return type:

None

test_get_pks_as_list_trailing_slash()[source]ΒΆ

Test parsing with trailing slash.

Return type:

None

test_get_pks_as_list_empty_string()[source]ΒΆ

Test parsing an empty string.

Return type:

None

test_get_pks_as_list_duplicates()[source]ΒΆ

Test that duplicates raise Http404.

Return type:

None

class trustpoint.tests.test_views.test_bulk_delete.TestPrimaryKeyQuerysetFromUrlMixin(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for PrimaryKeyQuerysetFromUrlMixin.

classmethod setUpTestData()[source]ΒΆ

Create test data for the test class.

Return type:

None

test_get_queryset_all_objects()[source]ΒΆ

Test getting all objects when no pks provided.

Return type:

None

test_get_queryset_with_pks()[source]ΒΆ

Test getting queryset with specific pks.

Return type:

None

test_get_queryset_with_invalid_pk()[source]ΒΆ

Test getting queryset with invalid pk.

Return type:

None

test_get_queryset_cached()[source]ΒΆ

Test that queryset is cached.

Return type:

None

class trustpoint.tests.test_views.test_bulk_delete.TestBaseBulkDeleteView(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for BaseBulkDeleteView.

classmethod setUpTestData()[source]ΒΆ

Create test data for the test class.

Return type:

None

setUp()[source]ΒΆ

Set up the test environment for each test case.

Return type:

None

test_post_valid_form()[source]ΒΆ

Test POST request with valid form.

Return type:

None

test_get_success_url_missing()[source]ΒΆ

Test that missing success_url raises ImproperlyConfigured.

Return type:

None

test_get_success_url_provided()[source]ΒΆ

Test getting success_url when provided.

Return type:

None

class trustpoint.tests.test_views.test_bulk_delete.TestBulkDeleteView(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for BulkDeleteView.

classmethod setUpTestData()[source]ΒΆ

Create test data for the test class.

Return type:

None

test_bulk_delete_view_inheritance()[source]ΒΆ

Test that BulkDeleteView inherits correctly.

Return type:

None