Module TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Str ListLoad Str Str Assign AttributeStore NameLoad attr Dict Str Str Str Str Str ListLoad Dict Str Str Str Str Str NameLoad Assign AttributeStore NameLoad attr Dict Str Num decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad Delete SubscriptDel NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad Delete SubscriptDel NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str ListLoad Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str ListLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str ListLoad Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str ListLoad Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str ListLoad Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Str ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Dict Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Delete SubscriptDel SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Dict Str Str ListLoad Str Dict Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Dict Str Str Num Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword BinOpMod Str Call NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword Str keyword Str keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword Num keyword Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword Str keyword Num keyword Num keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list
N/A N/A N/A unittest2 TestCase N/A N/A N/A ImportError N/A unittest TestCase collections defaultdict uuid uuid4 N/A mock N/A six couchdb.client Server couchdb.design ViewDefinition daybed.backends exceptions backend_exceptions daybed.backends.couchdb CouchDBBackendConnectionError CouchDBBackend daybed.backends.memory MemoryBackend daybed.backends.redis RedisBackend redis.exceptions ConnectionError daybed.backends.couchdb.views docs couchdb_views daybed.backends.id_generators KoremutakeGenerator daybed.tokens get_hawk_credentials BackendTestBase N/A object N/A N/A Test that the backends work as expected.

    This class is the base one, you can extend it with the name of the backend
    you want to test.  Since all the backend implementations share the same
    interface, all the tests should pass in the same way.
     __init__ N/A N/A self N/A args kwargs N/A N/A N/A self id_generator N/A KoremutakeGenerator N/A N/A N/A N/A super BackendTestBase self __init__ args kwargs N/A setUp N/A N/A self N/A N/A N/A N/A self permissions N/A read_definition N/A Remy Alexis N/A N/A self definition N/A title description fields simple One optional field N/A N/A name type required age int False N/A N/A self record N/A age 7 N/A _create_model N/A N/A self model_id N/A modelname N/A N/A N/A N/A N/A self db put_model N/A self definition N/A self permissions model_id N/A test_add_permissions_merges_redundant_permissions N/A N/A self N/A N/A N/A N/A test_store_credentials_fails_if_already_exist N/A N/A self N/A N/A N/A N/A token credentials N/A get_hawk_credentials N/A N/A N/A N/A self db store_credentials token credentials N/A N/A N/A self assertRaises N/A backend_exceptions CredentialsAlreadyExist N/A N/A self db store_credentials token credentials N/A test_store_credentials_fails_if_credentials_are_incorrects N/A N/A self N/A N/A N/A N/A token credentials N/A get_hawk_credentials N/A N/A credentials N/A id N/A N/A N/A self assertRaises AssertionError N/A N/A self db store_credentials token credentials N/A N/A token credentials N/A get_hawk_credentials N/A N/A credentials N/A key N/A N/A N/A self assertRaises AssertionError N/A N/A self db store_credentials token credentials N/A test_store_credentials_success N/A N/A self N/A N/A N/A N/A token credentials N/A get_hawk_credentials N/A N/A N/A N/A self db store_credentials token credentials N/A N/A N/A self assertEqual N/A N/A N/A self db get_token N/A credentials N/A id token N/A N/A N/A self assertEqual N/A N/A N/A self db get_credentials_key N/A credentials N/A id N/A credentials N/A key N/A test_get_models N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A self definition N/A title Simple Remy N/A N/A N/A N/A self db put_model N/A self definition N/A read_definition N/A Remy rems N/A N/A N/A self definition N/A title Simple Alex N/A N/A N/A N/A self db put_model N/A self definition N/A read_definition N/A Alexis alex N/A remy_models N/A N/A N/A self db get_models N/A Remy N/A N/A N/A self assertEqual N/A len remy_models 2 N/A N/A N/A self assertEqual N/A sorted remy_models key N/A N/A N/A x N/A N/A x N/A id N/A N/A id title description modelname simple One optional field N/A id title description rems Simple Remy One optional field N/A alex_models N/A N/A N/A self db get_models N/A Alexis N/A N/A N/A self assertEqual N/A len alex_models 2 N/A N/A N/A self assertEqual N/A sorted alex_models key N/A N/A N/A x N/A N/A x N/A id N/A N/A id title description alex Simple Alex One optional field N/A id title description modelname simple One optional field N/A principal_models N/A N/A N/A self db get_models N/A Remy Alexis N/A N/A N/A self assertEqual N/A len principal_models 3 N/A N/A N/A self assertEqual N/A sorted principal_models key N/A N/A N/A x N/A N/A x N/A id N/A N/A id title description alex Simple Alex One optional field N/A id title description modelname simple One optional field N/A id title description rems Simple Remy One optional field N/A test_get_models_unknown N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A self assertEqual N/A N/A N/A self db get_models N/A unknown N/A N/A test_get_model_permissions N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A self assertEqual N/A N/A N/A self db get_model_permissions modelname N/A read_definition N/A Remy Alexis N/A test_put_record N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A Alexis N/A item_id N/A N/A N/A self db put_record modelname N/A self record N/A Remy N/A N/A N/A N/A self db put_record modelname N/A self record N/A Alexis item_id N/A authors N/A N/A N/A self db get_record_authors modelname item_id N/A N/A N/A self assertEquals N/A set authors N/A set N/A Alexis Remy N/A test_get_records N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A author N/A records N/A N/A N/A self db get_records modelname N/A N/A N/A self assertEqual N/A len records 1 N/A N/A N/A self assertIn id N/A records N/A 0 N/A N/A N/A records N/A 0 N/A id N/A N/A N/A self assertDictEqual N/A records N/A 0 N/A age 7 N/A test_get_records_with_authors N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A author N/A records N/A N/A N/A self db get_records_with_authors modelname N/A N/A N/A self assertEqual N/A len records 1 N/A N/A N/A self assertIn id N/A N/A records N/A 0 N/A record N/A N/A N/A N/A records N/A 0 N/A record N/A id N/A N/A N/A self assertDictEqual N/A records N/A 0 N/A authors record N/A author N/A age 7 N/A test_get_records_empty N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A self assertEqual N/A N/A N/A self db get_records modelname N/A N/A test_get_record N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A author record N/A record N/A N/A N/A self record copy N/A N/A record N/A id record N/A N/A N/A self assertEqual N/A N/A N/A self db get_record modelname record record N/A test_get_record_authors N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A author record N/A N/A N/A self assertEqual N/A N/A N/A self db get_record_authors modelname record N/A author N/A test_delete_record N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A N/A self db put_record modelname N/A self record N/A author record N/A N/A N/A N/A self db delete_record modelname record N/A N/A N/A self assertRaises N/A backend_exceptions RecordNotFound N/A N/A self db get_record modelname record N/A test_get_model_definition N/A N/A self N/A N/A N/A N/A N/A self _create_model N/A N/A N/A self assertEquals N/A N/A N/A self db get_model_definition modelname N/A self definition N/A test_delete_model N/A N/A self N/A N/A N/A N/A N/A self _create_model modelname N/A N/A N/A N/A self db put_record modelname N/A self record N/A Remy 123456 N/A resp N/A N/A N/A self db delete_model modelname N/A N/A N/A self assertEqual resp N/A definition permissions records N/A self definition N/A self permissions N/A N/A age id 7 123456 N/A N/A N/A self assertRaises N/A backend_exceptions ModelNotFound N/A N/A self db get_model_definition modelname N/A N/A N/A self assertRaises N/A backend_exceptions ModelNotFound N/A N/A self db get_records modelname N/A N/A N/A self assertRaises N/A backend_exceptions RecordNotFound N/A N/A self db get_record modelname 123456 N/A test_model_deletion_raises_if_unknown N/A N/A self N/A N/A N/A N/A N/A self assertRaises N/A backend_exceptions ModelNotFound N/A N/A self db delete_model unknown N/A N/A TestCouchDBBackend N/A BackendTestBase TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self db N/A CouchDBBackend host http://localhost:5984 db_name N/A test_%s N/A uuid4 id_generator N/A self id_generator N/A N/A N/A N/A super TestCouchDBBackend self setUp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self db delete_db N/A test_server_unreachable N/A N/A self N/A N/A N/A N/A N/A self assertRaises CouchDBBackendConnectionError N/A N/A N/A CouchDBBackend host http://unreachable db_name daybed id_generator N/A self id_generator N/A test_load_from_config N/A N/A self constructor_mock N/A N/A N/A N/A constructor_mock return_value None N/A config N/A N/A mock MagicMock N/A N/A N/A CouchDBBackend load_from_config config N/A N/A N/A self assertTrue N/A constructor_mock called N/A N/A N/A mock patch daybed.backends.couchdb.CouchDBBackend.__init__ N/A TestRedisBackend N/A BackendTestBase TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self db N/A RedisBackend host localhost port 6379 db 5 id_generator N/A self id_generator N/A N/A N/A N/A super TestRedisBackend self setUp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self db delete_db N/A test_server_unreachable N/A N/A self N/A N/A N/A N/A N/A self assertRaises ConnectionError N/A N/A N/A RedisBackend host unreachable port 6379 db 5 id_generator N/A self id_generator N/A test_load_from_config N/A N/A self constructor_mock N/A N/A N/A N/A constructor_mock return_value None N/A config N/A N/A mock MagicMock N/A N/A N/A RedisBackend load_from_config config N/A N/A N/A self assertTrue N/A constructor_mock called N/A N/A N/A mock patch daybed.backends.redis.RedisBackend.__init__ N/A TestMemoryBackend N/A BackendTestBase TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self db N/A MemoryBackend N/A self id_generator N/A N/A N/A N/A super TestMemoryBackend self setUp N/A N/A