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.
- 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.