management.tests.test_views.test_loggingΒΆ

Test suite for logging views.

ClassesΒΆ

IndexViewTest

Test suite for IndexView.

LanguageViewTest

Test suite for language view function.

LoggingFilesTableViewTest

Test suite for LoggingFilesTableView.

LoggingFilesDetailsViewTest

Test suite for LoggingFilesDetailsView.

LoggingFilesDownloadViewTest

Test suite for LoggingFilesDownloadView.

LoggingFilesDownloadMultipleViewTest

Test suite for LoggingFilesDownloadMultipleView.

Module ContentsΒΆ

class management.tests.test_views.test_logging.IndexViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for IndexView.

test_redirect_is_permanent()[source]ΒΆ

Test that IndexView redirects permanently.

test_pattern_name()[source]ΒΆ

Test that IndexView redirects to management:language.

class management.tests.test_views.test_logging.LanguageViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for language view function.

setUp()[source]ΒΆ

Set up test fixtures.

test_language_view_returns_response(mock_render)[source]ΒΆ

Test language view returns HttpResponse.

test_language_view_context_has_page_category(mock_render)[source]ΒΆ

Test language view context includes page_category.

class management.tests.test_views.test_logging.LoggingFilesTableViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for LoggingFilesTableView.

setUp()[source]ΒΆ

Set up test fixtures.

test_template_name()[source]ΒΆ

Test correct template is used.

test_context_object_name()[source]ΒΆ

Test correct context object name.

test_default_sort_param()[source]ΒΆ

Test default sort parameter.

test_page_category_and_name()[source]ΒΆ

Test page category and name are set correctly.

test_http_method_names()[source]ΒΆ

Test only GET method is allowed.

test_get_queryset_with_valid_log_files(mock_log_dir)[source]ΒΆ

Test get_queryset returns list of valid log files.

test_get_log_file_data_with_valid_dates(mock_get_dates, mock_log_dir)[source]ΒΆ

Test _get_log_file_data with valid datetime entries.

test_get_log_file_data_with_none_dates(mock_get_dates, mock_log_dir)[source]ΒΆ

Test _get_log_file_data when no dates are found in log file.

test_get_log_file_data_with_nonexistent_file(mock_log_dir)[source]ΒΆ

Test _get_log_file_data with non-existent file.

test_get_first_and_last_entry_date_with_valid_log()[source]ΒΆ

Test _get_first_and_last_entry_date with valid log entries.

test_get_first_and_last_entry_date_with_no_dates()[source]ΒΆ

Test _get_first_and_last_entry_date with log containing no dates.

class management.tests.test_views.test_logging.LoggingFilesDetailsViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for LoggingFilesDetailsView.

setUp()[source]ΒΆ

Set up test fixtures.

test_template_name()[source]ΒΆ

Test correct template is used.

test_page_category_and_name()[source]ΒΆ

Test page category and name are set correctly.

test_get_context_data_with_existing_file(mock_log_dir)[source]ΒΆ

Test get_context_data with existing log file.

test_get_context_data_with_nonexistent_file(mock_log_dir)[source]ΒΆ

Test get_context_data with non-existent log file.

class management.tests.test_views.test_logging.LoggingFilesDownloadViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for LoggingFilesDownloadView.

setUp()[source]ΒΆ

Set up test fixtures.

test_page_category_and_name()[source]ΒΆ

Test page category and name are set correctly.

test_get_with_existing_file(mock_log_dir)[source]ΒΆ

Test GET method with existing file.

test_get_with_nonexistent_file(mock_log_dir)[source]ΒΆ

Test GET method with non-existent file raises Http404.

test_get_without_filename()[source]ΒΆ

Test GET method without filename raises Http404.

class management.tests.test_views.test_logging.LoggingFilesDownloadMultipleViewTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for LoggingFilesDownloadMultipleView.

setUp()[source]ΒΆ

Set up test fixtures.

test_page_category_and_name()[source]ΒΆ

Test page category and name are set correctly.

test_get_with_zip_format(mock_log_dir)[source]ΒΆ

Test GET method creating ZIP archive.

test_get_with_tar_gz_format(mock_log_dir)[source]ΒΆ

Test GET method creating tar.gz archive.

test_get_without_archive_format()[source]ΒΆ

Test GET method without archive format raises Http404.

test_get_without_filenames()[source]ΒΆ

Test GET method without filenames raises Http404.

test_get_with_invalid_archive_format()[source]ΒΆ

Test GET method with invalid archive format raises Http404.

test_get_with_empty_filenames_string(mock_log_dir)[source]ΒΆ

Test GET method with empty filenames string.

test_get_with_multiple_files_zip(mock_log_dir)[source]ΒΆ

Test GET method with multiple files in ZIP.

test_get_with_multiple_files_tar_gz(mock_log_dir)[source]ΒΆ

Test GET method with multiple files in tar.gz.