TestNew/detect_googlebot | Detects Googlebot user agent | IsBot=true, BotName=“googlebot”, Category=“search” |
TestNew/detect_curl | Detects curl HTTP client | IsBot=true, Category=“tool” |
TestNew/normal_browser | Normal browser user agent | IsBot=false |
TestWithOptions_BlockBots/block_bot | Block detected bots | Returns 403 Forbidden |
TestWithOptions_BlockBots/allow_browser | Allow normal browsers | Returns 200 OK |
TestWithOptions_AllowedBots/allowed_bot | Allowlist mode with Googlebot | Returns 200 OK for allowed bot |
TestWithOptions_AllowedBots/non-allowed_bot | Allowlist mode with curl | Returns 403 Forbidden |
TestWithOptions_BlockedBots/blocked_bot | Blocklist mode with Semrush | Returns 403 Forbidden |
TestWithOptions_CustomPatterns | Custom bot pattern detection | Detects custom bot pattern |
TestWithOptions_ErrorHandler | Custom error handler | Returns JSON response |
TestIsBot | Helper function test | Returns true for bots |
TestBotName | Bot name extraction | Returns detected bot name |
TestBlock | Block all bots helper | Returns 403 for any bot |
TestAllow | Allow specific bots helper | Allows listed bots only |
TestDeny | Deny specific bots helper | Blocks listed bots |