management.tests.test_models.test_backup

Test suite for the BackupOptions model.

Classes

BackupOptionsModelTest

Test suite for the BackupOptions model, ensuring that it enforces singleton behavior.

BackupOptionsFormTest

Test suite for the BackupOptionsForm, ensuring validation logic.

Module Contents

class management.tests.test_models.test_backup.BackupOptionsModelTest(methodName='runTest')[source]

Bases: django.test.TestCase

Test suite for the BackupOptions model, ensuring that it enforces singleton behavior.

test_singleton_creation()[source]

Test that attempts to create more than one BackupOptions instance.

Return type:

None

test_singleton_save_overwrite()[source]

Test that saving an existing BackupOptions instance overwrites its values.

Return type:

None

class management.tests.test_models.test_backup.BackupOptionsFormTest(methodName='runTest')[source]

Bases: django.test.TestCase

Test suite for the BackupOptionsForm, ensuring validation logic.

test_invalid_sftp_configuration()[source]

Test that enabling SFTP storage without providing required fields.

Return type:

None

test_sftp_password_auth_without_password()[source]

Test validation fails when password is not provided for PASSWORD auth method.

Return type:

None

test_sftp_ssh_key_auth_without_private_key()[source]

Test validation fails when private_key is not provided for SSH_KEY auth method.

Return type:

None

test_valid_sftp_password_auth()[source]

Test that SFTP with PASSWORD auth method and valid password passes validation.

Return type:

None

test_valid_sftp_ssh_key_auth()[source]

Test that SFTP with SSH_KEY auth method and valid private_key passes validation.

Return type:

None