test: Test suite against CTFd's own test app, lint tooling

- plugin_tests/: 9 tests running the plugin inside CTFd 3.8.9's test app
  (users and teams mode): own/shared flags, single reports, admins,
  invalid owners and empty flags, teams, create_flag_if_missing, the
  admin flag form, the admin page and dismissing.
- make venv (uv, Python 3.11), make lint, make format, make test: same
  tools and versions as ctfd-whale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Matte23andClaude Opus 5.5 committed 2026-11-18 10:21:53 +01:00
1 parent 8084b3996a
commit e54d98498c
7 files changed
+307

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
[pytest]
# This directory is the rootdir on purpose: the repo root is the plugin
# package itself (it has an __init__.py), which pytest would otherwise import
# as a test package before any CTFd app exists. The folder isn't called
# "tests" because CTFd's own tests package, whose helpers the suite uses,
# needs that name. Run with: make test
addopts = -p no:cacheprovider
filterwarnings =
ignore::DeprecationWarning
# CTFd's test client uses the "localhost" cookie domain
ignore:'localhost' is not a valid cookie domain:UserWarning
# CTFd's Flags model maps no subclasses: every flag type warns
ignore:Flushing object .* with incompatible polymorphic identity