async fn should_enforce_policy_returns_false_on_not_enough_requests_seen() {
        let (handles, _) = setup_requester_test(None).await;

        let requester = Requester {
            handles,
            seen_links: RwLock::new(HashSet::<String>::new()),
            tuning_lock: Mutex::new(0),
            ferox_scan: Arc::new(FeroxScan::default()),
            target_url: "http://localhost".to_string(),
            rate_limiter: RwLock::new(None),
            policy_data: Default::default(),
        };

        let ferox_scan = Arc::new(FeroxScan::default());

        increment_errors(requester.handles.clone(), ferox_scan.clone(), 49).await;
        // 49 errors is false because we haven't hit the min threshold
        assert_eq!(atomic_load!(requester.handles.stats.data.requests), 49);
        assert_eq!(requester.should_enforce_policy(), None);
    }
/// should_enforce_policy should return false when # of requests is < threads; also when < 50
should_enforce_policy should return false when # of requests is < threads; also when < 50
should_enforce_policy should return false when # of requests is < threads ; also when < 50
async fn should_enforce_policy_returns_false_on_not_enough_requests_seen() {
        let (handles, _) = setup_requester_test(None).await;
        let requester = Requester {
            handles,
            seen_links: RwLock::new(HashSet::<String>::new()),
            tuning_lock: Mutex::new(0),
            ferox_scan: Arc::new(FeroxScan::default()),
            target_url: "http://localhost".to_string(),
            rate_limiter: RwLock::new(None),
            policy_data: Default::default(),
        };
        let ferox_scan = Arc::new(FeroxScan::default());
        increment_errors(requester.handles.clone(), ferox_scan.clone(), 49).await;
        // 49 errors is false because we haven't hit the min threshold
        assert_eq!(atomic_load!(requester.handles.stats.data.requests), 49);
        assert_eq!(requester.should_enforce_policy(), None);
    }
async fn should_enforce_policy_returns_false_on_not_enough_requests_seen ( ) { let ( handles , _ ) = setup_requester_test ( None ) . await ; let requester = Requester { handles , seen_links : RwLock :: new ( HashSet :: < String > :: new ( ) ) , tuning_lock : Mutex :: new ( 0 ) , ferox_scan : Arc :: new ( FeroxScan :: default ( ) ) , target_url : " " . to_string ( ) , rate_limiter : RwLock :: new ( None ) , policy_data : Default :: default ( ) , } ; let ferox_scan = Arc :: new ( FeroxScan :: default ( ) ) ; increment_errors ( requester . handles . clone ( ) , ferox_scan . clone ( ) , 49 ) . await ; // 49 errors is false because we haven't hit the min threshold assert_eq ! ( atomic_load ( requester handles stats data requests ) 49 ) ; assert_eq ! ( requester should_enforce_policy ( ) None ) ; }
should_enforce_policy should return false when # of requests is < threads; also when < 50
should_enforce_policy should return false when # of requests is < threads ; also when < 50