anchor.diff:      Rev = proplists:get_value(<<"_rev">>, DocProps),
       {ok, 200, _, _} = do_request(delete, Url ++ "?rev=" ++ ?b2l(Rev)),
       % let's proceed after giving couchdb_peruser some time to delete the user db
  -    timer:sleep(50).
  +    timer:sleep(1000).
  +
  +get_security(DbName) ->
  +    Url = lists:concat([
  +        get_cluster_base_url(), "/", ?b2l(DbName), "/_security"]),
  +    {ok, 200, _, Body} = do_request(get, Url),
  +    {SecurityProperties} = jiffy:decode(Body),
  +    SecurityProperties.
  +
  +set_security(DbName, SecurityProperties) ->
  +    Url = lists:concat([
  +        get_cluster_base_url(), "/", ?b2l(DbName), "/_security"]),
  +    Body = jiffy:encode({SecurityProperties}),
  +    {ok, 200, _, _} = do_request(put, Url, Body).
   
   all_dbs() ->
       {ok, 200, _, Body} = do_request(get, get_cluster_base_url() ++ "/_all_dbs"),
  
positive.code:     set_config("couchdb_peruser", "enable", "false"),
      create_user(TestAuthDb, User),
      ?_assert(not lists:member(UserDbName, all_dbs())).
  
  couchdb_peruser_test_() ->
      {
  
negative.code:                     fun should_create_user_db/1,
                      fun should_not_delete_user_db/1,
                      fun should_delete_user_db/1,
                      fun should_reflect_config_changes/1,
                      fun should_assign_user_to_db_admins/1,
                      fun should_assign_user_to_db_members/1,
                      fun should_not_remove_existing_db_admins/1,
                      fun should_not_remove_existing_db_members/1
                  ]
              }
          }
  