You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_auth_views.rs
    path of file: ./repos/Actix-Blog/src/test
    
    the code of the file until where you have to start completion: use actix_web::{ test, web, App, http::header, http };
use actix_files as fs;
use actix_identity::{ CookieIdentityPolicy, IdentityService };
use actix_service::Service;
use bytes::Bytes;
use serde::{ Serialize, Deserialize };

use crate::views;
use super::{ generate_random_string, insert_posts, insert_new_user, test_db_pool, USERNAME_WITH_PWD };

#[actix_rt::test]
async fn test_login() {
    let mut app = test::init_service(App::new()
     
    
async fn test_reset_password() {
    // There is one user in database at least for testing.
    insert_new_user();

    let mut app = test::init_service(App::new().data(test_db_pool().unwrap().clone())
        .wrap(
            IdentityService::new(
                CookieIdentityPolicy::new(&[0;32])
                    .name("admin")
                    .path("/admin")
                    .max_age(60i64)
                    .secure(false)
            )
        )
        .service(fs::Files::new("/static", "static/").show_files_listing())
        .service(
            web::scope("/admin").service(web::resource("/login/").route(web::post().to(views::auth::handle_login)))
                                .service(web::resource("/reset_password/").route(web::get().to(views::auth::reset_password)))
        )
    ).await;

    // before test getting dashboard, login is required due to setting identity.
    let req = test::TestRequest::post()
                .uri("/admin/login/")
                .header(header::CONTENT_TYPE, "application/x-www-form-urlencoded")
                .set_payload(Bytes::from_static(USERNAME_WITH_PWD))
                .to_request();
    let resp = app.call(req).await.unwrap();
    assert_eq!(resp.status(), http::StatusCode::TEMPORARY_REDIRECT);

    // get identity
    let identity = resp.response().cookies().next().clone();
    assert!(identity.is_some());

    let req = test::TestRequest::get()
                .uri("/admin/reset_password/")
                .cookie(identity.unwrap())
                .to_request();
    let resp = app.call(req).await.unwrap();
    assert_eq!(resp.status(), http::StatusCode::OK);
}