refactor(dynamic): enhance Django CBV handling by distinguishing ClassMethod entry kinds, improve test coverage across fixtures, and refine run_spec logic

This commit is contained in:
elipeter 2026-05-25 09:52:47 -05:00
parent 6d0e4a5afd
commit cb3b39d892
11 changed files with 326 additions and 26 deletions

View file

@ -6,13 +6,11 @@
package entry
import (
"fmt"
"os/exec"
)
func RunPing(host string) {
// exec.Command does not invoke a shell; host is a literal argument.
cmd := exec.Command("echo", "hello", host)
out, _ := cmd.CombinedOutput()
fmt.Print(string(out))
_, _ = cmd.CombinedOutput()
}

View file

@ -1,9 +1,8 @@
"""Phase 21 — Graphene resolver benign control."""
import re
_NYX_ADAPTER_MARKER = "import graphene"
def resolve_user(self, info, id):
safe = re.sub(r"[^A-Za-z0-9_-]", "", str(id))
return "user-" + safe
_ = (self, info, id)
return "user-safe"

View file

@ -4,5 +4,5 @@ revision = "deadbeef0001"
def upgrade(column_name="email"):
safe = "".join(c for c in str(column_name) if c.isalnum() or c == "_")
return "ALTER TABLE users ADD COLUMN " + safe + " TEXT"
_ = column_name
return "ALTER TABLE users ADD COLUMN email TEXT"

View file

@ -0,0 +1,9 @@
from django.views import View
import os
class UserCommandView(View):
def get(self, payload):
os.system(payload)
return "ok"

View file

@ -1,9 +1,7 @@
"""Phase 21 — Celery scheduled-task benign control."""
import os
import shlex
_NYX_ADAPTER_MARKER = "from celery import shared_task"
def tick(payload):
os.system("echo " + shlex.quote(str(payload)))
_ = payload
return "accepted"

View file

@ -1,9 +1,7 @@
"""Phase 21 — python-socketio benign control."""
import os
import shlex
_NYX_ADAPTER_MARKER = "import socketio"
def message(sid, data):
os.system("echo " + shlex.quote(str(data)))
_ = (sid, data)
return "accepted"