File size: 293 Bytes
70f8e84
 
 
 
 
 
 
1
2
3
4
5
6
7
import requests

def test_sql_injection_login():
    url = "http://127.0.0.1:8000/api/v1/insightfy/login"
    payload = {"email": "test' OR '1'='1", "otp": "123456"}
    response = requests.post(url, json=payload)
    assert response.status_code != 200, "SQL Injection vulnerability detected!"