style: apply ruff auto-fix
- Auto-formatted code with ruff format - Applied ruff linting fixes with --fix Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -831,11 +831,13 @@ class TestUserNotificationService:
|
|||||||
result = _send_email_notification({"smtp_host": "smtp.example.com"}, "Title", "Body")
|
result = _send_email_notification({"smtp_host": "smtp.example.com"}, "Title", "Body")
|
||||||
assert result is False
|
assert result is False
|
||||||
|
|
||||||
|
|
||||||
class TestBenchmark:
|
class TestBenchmark:
|
||||||
@pytest.mark.unit
|
@pytest.mark.unit
|
||||||
def test_update_preferences_benchmark(self, notif_engine, notif_session):
|
def test_update_preferences_benchmark(self, notif_engine, notif_session):
|
||||||
import time
|
|
||||||
import statistics
|
import statistics
|
||||||
|
import time
|
||||||
|
|
||||||
from app.main import app
|
from app.main import app
|
||||||
|
|
||||||
target = UserNotificationTarget(
|
target = UserNotificationTarget(
|
||||||
@@ -853,12 +855,14 @@ class TestBenchmark:
|
|||||||
items_count = 100
|
items_count = 100
|
||||||
preferences = []
|
preferences = []
|
||||||
for i in range(items_count):
|
for i in range(items_count):
|
||||||
preferences.append({
|
preferences.append(
|
||||||
"event_type": f"event.type.{i}",
|
{
|
||||||
"channel_type": "webhook",
|
"event_type": f"event.type.{i}",
|
||||||
"is_enabled": True,
|
"channel_type": "webhook",
|
||||||
"target_id": target.id,
|
"is_enabled": True,
|
||||||
})
|
"target_id": target.id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
payload = {"preferences": preferences}
|
payload = {"preferences": preferences}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user