tardis.apps.hsm.tests package¶
Submodules¶
tardis.apps.hsm.tests.test_api module¶
Testing the hsm app’s extensions to the tastypie-based mytardis api .. moduleauthor:: James Wettenhall <james.wettenhall@monash.edu>
-
class
tardis.apps.hsm.tests.test_api.
HsmAppApiTestCase
(methodName='runTest')¶ Bases:
tardis.tardis_portal.tests.api.MyTardisResourceTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_ds_check
()¶ Test the task for updating a dataset’s Online Status metadata
-
test_online_check_unsupported_storage_class
()¶ Test API endpoint for HSM online check with unsupported storage class
-
test_online_check_unverified_file
()¶ Test API endpoint for HSM online check with unverified file
-
test_online_check_valid_storage_class
()¶ Test API endpoint for HSM online check with valid storage class
-
test_online_check_with_bad_password
()¶ Test API endpoint for HSM online check without ACL access to DFO
-
test_online_check_without_acl_access_to_dfo
()¶ Test API endpoint for HSM online check without ACL access to DFO
-
test_online_count
()¶ Test counting the number of online files in a dataset
This method (designed to be fast) looks directly at the files on disk without checking if each file is verified in the database Since the underlying method checks for hidden external attribute on mount.cifs mounted filesystem, it may return offline status for a file in test environment
-
test_recall
()¶ Test the API endpoint for recalling a file from tape on an HSM system. The “recall” just attempts to read the first bit of the file which on most HSM systems will automatically trigger a recall.
-
test_stat_subprocess
()¶ If the Python os.stat function can’t determine the number of blocks used by the file, then the hsm app falls back to using a subprocess
-
tardis.apps.hsm.tests.test_app_config module¶
tardis.apps.hsm.tests.test_email_templates module¶
Tests for HSM app’s email templates
-
class
tardis.apps.hsm.tests.test_email_templates.
HsmAppEmailTemplateTestCase
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_recall_complete_email
()¶ Test using the email template for a successful recall
-
test_recall_failed_email
()¶ Test using the email template for a failed recall
-
tardis.apps.hsm.tests.test_migrations module¶
Tests for HSM app’s migrations
-
class
tardis.apps.hsm.tests.test_migrations.
HsmAppMigrationTestCase
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
-
connection
= <django.db.backends.sqlite3.base.DatabaseWrapper object>¶
-
test_migration
()¶ Test unapplying and reapplying the migration which creates the metadata for the HSM app
-