Contract tests#
The test suites checking that a storage follows the storage contract. They need the
testing extra.
- class scim2_server.testing.ScimStorageContract[source]#
The rules every
ScimStoragefollows.The suite uses the
UserandGroupresource types of theproviderfixture, which serves the default resource types of RFC 7643 unless overridden. The tests of a feature that the configuration of the provider does not announce, such as sorting, are skipped. So are the tests of the cursors, unless the storagesupports_cursors.- supports_root_search: bool = True#
Whether the storage searches several resource types at once.
Set it to
Falsefor a storage raisingNotImplementedExceptionin that case.
- stores_created: bool = True#
Whether the storage stores
meta.created.Set it to
Falsefor a storage that leavesmeta.createdempty.
- stores_last_modified: bool = True#
Whether the storage stores
meta.lastModified.Set it to
Falsefor a storage that leavesmeta.lastModifiedempty.
- stores_password: bool = True#
Whether the storage stores the
passwordof the users.Set it to
Falseonly for a storage that does not keep the password at all. The tests of the write-only and never returned attributes are then skipped. A storage that keeps a hash of the password stores it: itsget()returns the hash.
- stores_mailboxes: bool = False#
Whether the storage stores the
Mailboxresources.Set it to
Trueto check the uniqueness of sub-attributes and of multi-valued attributes. The storage then serves theMailboxresource type,MAILBOX_TYPE. Theproviderfixture serves it too.
- class scim2_server.testing.Mailbox[source]#
A resource holding unique values below its attributes.
The tests of the uniqueness of sub-attributes and of multi-valued attributes create mailboxes. No two mailboxes share an alias, but two aliases differing by their case are different.
- class scim2_server.testing.MailboxAddress[source]#
An address of a
Mailbox. No two mailboxes share an address, whatever its case.
- class scim2_server.testing.MailboxOwner[source]#
The owner of a
Mailbox. No two mailboxes share an owner, whatever its case.
- scim2_server.testing.MAILBOX_TYPE#
The resource type of the
Mailboxresources, served at/Mailboxes.
- class scim2_server.testing.AsyncScimStorageContract[source]#
The rules every
AsyncScimStoragefollows.These are the rules of
ScimStorageContract. Each test runs the coroutines of the storage on a single event loop, one after the other.