fix(lint): remove trailing whitespace from blank lines in test files
Aegis CI / lint-and-test (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
This commit is contained in:
@@ -37,7 +37,7 @@ def test_login_inactive_user(client, db):
|
|||||||
"""Test login with inactive user returns 400."""
|
"""Test login with inactive user returns 400."""
|
||||||
from app.auth import hash_password
|
from app.auth import hash_password
|
||||||
from app.models.user import User
|
from app.models.user import User
|
||||||
|
|
||||||
user = User(
|
user = User(
|
||||||
username="inactive",
|
username="inactive",
|
||||||
hashed_password=hash_password("password"),
|
hashed_password=hash_password("password"),
|
||||||
@@ -46,7 +46,7 @@ def test_login_inactive_user(client, db):
|
|||||||
)
|
)
|
||||||
db.add(user)
|
db.add(user)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
response = client.post(
|
response = client.post(
|
||||||
"/api/v1/auth/login",
|
"/api/v1/auth/login",
|
||||||
data={"username": "inactive", "password": "password"},
|
data={"username": "inactive", "password": "password"},
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def test_create_duplicate_technique(client, auth_headers):
|
|||||||
json={"mitre_id": "T1001", "name": "First"},
|
json={"mitre_id": "T1001", "name": "First"},
|
||||||
headers=auth_headers,
|
headers=auth_headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Try to create duplicate
|
# Try to create duplicate
|
||||||
response = client.post(
|
response = client.post(
|
||||||
"/api/v1/techniques",
|
"/api/v1/techniques",
|
||||||
@@ -71,7 +71,7 @@ def test_get_technique_by_mitre_id(client, auth_headers):
|
|||||||
json={"mitre_id": "T1059", "name": "Test Technique"},
|
json={"mitre_id": "T1059", "name": "Test Technique"},
|
||||||
headers=auth_headers,
|
headers=auth_headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get it by mitre_id
|
# Get it by mitre_id
|
||||||
response = client.get("/api/v1/techniques/T1059", headers=auth_headers)
|
response = client.get("/api/v1/techniques/T1059", headers=auth_headers)
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
@@ -92,7 +92,7 @@ def test_update_technique(client, auth_headers):
|
|||||||
json={"mitre_id": "T1059", "name": "Original Name"},
|
json={"mitre_id": "T1059", "name": "Original Name"},
|
||||||
headers=auth_headers,
|
headers=auth_headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Update it
|
# Update it
|
||||||
response = client.patch(
|
response = client.patch(
|
||||||
"/api/v1/techniques/T1059",
|
"/api/v1/techniques/T1059",
|
||||||
@@ -116,7 +116,7 @@ def test_filter_techniques_by_tactic(client, auth_headers):
|
|||||||
json={"mitre_id": "T1002", "name": "Persist", "tactic": "persistence"},
|
json={"mitre_id": "T1002", "name": "Persist", "tactic": "persistence"},
|
||||||
headers=auth_headers,
|
headers=auth_headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Filter by execution
|
# Filter by execution
|
||||||
response = client.get(
|
response = client.get(
|
||||||
"/api/v1/techniques?tactic=execution",
|
"/api/v1/techniques?tactic=execution",
|
||||||
|
|||||||
Reference in New Issue
Block a user