chapps.tests.test_adapter.test_adapter module
Tests of CHAPPS adapters module
- class chapps.tests.test_adapter.test_adapter.Test_PolicyConfigAdapter[source]
Bases:
object
- class chapps.tests.test_adapter.test_adapter.Test_MariaDBQuotaAdapter[source]
Bases:
object
- test_initialize_tables_default(finalizing_mdbqadapter, database_fixture)[source]
Verify that MDBQA’s table initialization works properly
- test_initialize_tables_with_quotas(finalizing_mdbqadapter, database_fixture)[source]
Verify that MDBQA’s table initialization works properly
- test_finalize(mdbqadapter_fixture)[source]
Verify that MDBQA’s finalize routine closes the database connection
- test_quota_for_user(populated_database_fixture, finalizing_mdbqadapter)[source]
Verify that MDBQA.quota_for_user returns the expected quota for an email
- test_quota_for_nonexistent_user(populated_database_fixture, finalizing_mdbqadapter)[source]
Verify that MDBQA.quota_for_user returns None when the email is not found in the database.
- test_quota_dump(populated_database_fixture, finalizing_mdbqadapter)[source]
Verify that MDBQA._quota_search returns rows for all entries in the quota_user table if no list is specified
- test_quota_search(populated_database_fixture, finalizing_mdbqadapter, test_emails)[source]
Verify that MDBQA._quota_search returns rows for all valid email addresses
- test_quota_search_accuracy(populated_database_fixture, finalizing_mdbqadapter, test_emails)[source]
Verify that MDBQA._quota_search produces accurate results
- test_MDBQA_quota_dict(populated_database_fixture, finalizing_mdbqadapter, test_emails)[source]
Verify that MDBQA.quota_dict returns a dict full of quotas
- class chapps.tests.test_adapter.test_adapter.Test_MariaDBSenderDomainAuthAdapter[source]
Bases:
object
- test_initialize_tables(finalizing_mdbsdaadapter, database_fixture)[source]
Verify that MDBSDAA’s table initialization works properly
- test_check_domain_for_user(finalizing_mdbsdaadapter, populated_database_fixture)[source]
GIVEN a user has an entry in the database WHEN that user tries to send an email for a domain they are linked to THEN return a True result
- class chapps.tests.test_adapter.test_adapter.Test_MariaDBInboundFlagsAdapter[source]
Bases:
object
- test_greylisting_flag_set(finalizing_mdbifadapter, populated_database_fixture_with_extras, greylisting_domain)[source]
- GIVEN
a domain has greylisting option set ON
- WHEN
the adapter is asked about that option
- THEN
the adapter should return True
- test_greylisting_flag_unset(finalizing_mdbifadapter, populated_database_fixture_with_extras, no_options_domain)[source]
- GIVEN
a domain has greylisting option set OFF
- WHEN
the adapter is asked about that option
- THEN
the adapter should return False