bug_hub.tests.views package

bug_hub.tests.views Submodules

bug_hub.tests.views.test_bug_create_view module

This module contains unit tests for validating the view when creating new bug reports in the Bug Hub application.

class bug_hub.tests.views.test_bug_create_view.BugCreateViewTestCase(methodName='runTest')[source]

Bases: TestCase

Test case for the BugCreateView class, which handles the creation of bug reports.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_request()[source]

Test GET request: 200 status, ‘bug_create.html’ template used.

test_post_request_without_form()[source]

Test POST request: Redirects to ‘bug_list’, confirms Bug object creation.

bug_hub.tests.views.test_bug_detail_view module

This module contains unit tests for validating the view when viewing the details of a bug report in the Bug Hub application.

class bug_hub.tests.views.test_bug_detail_view.BugDetailViewTestCase(methodName='runTest')[source]

Bases: TestCase

Test case for the BugDetailView class.

Parameters:
  • bug (Bug) – A Bug object created for testing.

  • url (str) – The URL for the bug detail view.

setUp()[source]

Set up the test environment by creating a test Bug object and initializing the URL.

test_bug_detail_view()[source]

Test the bug detail view’s response, template usage, and context data.

bug_hub.tests.views.test_bug_list_view module

This module contains unit tests for validating the view when viewing the list of all bug reports in the Bug Hub application.

class bug_hub.tests.views.test_bug_list_view.BugListViewTestCase(methodName='runTest')[source]

Bases: TestCase

Test case for the BugListView class.

url

The URL for the bug list view.

Type:

str

setUp()[source]

Set up the test environment by initializing the URL.

test_bug_list_pagination()[source]

Test pagination in the bug list view.

test_bug_list_view()[source]

Test the bug list view’s GET response and template usage.