Increase security and reformat

This commit is contained in:
2026-03-07 20:52:13 +00:00
parent 10588a18b9
commit bca4d6898f
144 changed files with 6735 additions and 3960 deletions

View File

@@ -6,10 +6,9 @@ from django.test import TestCase
from core.commands.base import CommandContext
from core.commands.engine import _matches_trigger, process_inbound_message
from core.messaging.reply_sync import extract_reply_ref, resolve_reply_target
from core.views.compose import _command_options_for_channel
from core.models import (
ChatTaskSource,
ChatSession,
ChatTaskSource,
CommandAction,
CommandChannelBinding,
CommandProfile,
@@ -19,6 +18,7 @@ from core.models import (
PersonIdentifier,
User,
)
from core.views.compose import _command_options_for_channel
class Phase1ReplyResolutionTests(TestCase):
@@ -402,7 +402,9 @@ class Phase1CommandEngineTests(TestCase):
if profile is None:
return
self.assertEqual(3, CommandAction.objects.filter(profile=profile).count())
self.assertEqual(3, CommandVariantPolicy.objects.filter(profile=profile).count())
self.assertEqual(
3, CommandVariantPolicy.objects.filter(profile=profile).count()
)
self.assertEqual(
2,
CommandChannelBinding.objects.filter(
@@ -436,7 +438,9 @@ class Phase1CommandEngineTests(TestCase):
self.assertEqual(1, len(second_results))
self.assertEqual("reply_required", second_results[0].error)
self.assertEqual(3, CommandAction.objects.filter(profile=profile).count())
self.assertEqual(3, CommandVariantPolicy.objects.filter(profile=profile).count())
self.assertEqual(
3, CommandVariantPolicy.objects.filter(profile=profile).count()
)
self.assertEqual(
2,
CommandChannelBinding.objects.filter(