-
Notifications
You must be signed in to change notification settings - Fork 2
V2.2.2 #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… rather than hardcode (13 does match my manual count)
…s, Relationships, and Lookups
…ion test for MediaBulkUpload Records
…in Admin. Creating 'ITKTestCase' class to repeat dummy data loading
…self' iframes and subdomains of a given domain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A version bump to 2.2.2, security header tweaks, test fixture loading refactor, and a new DefaultModel base class with model inheritance updates.
- Adjusted Nginx security headers (commented out X-Frame-Options, broadened CSP).
- Replaced Django fixture declarations with a custom
import_fixture_filehelper in tests. - Introduced
DefaultModelto auto-reset DB sequences on unique-constraint errors and applied it across models. - Refactored admin bulk-upload tests to use
RequestFactoryand bumpedVERSIONin settings.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/tekdb_nginx.conf | Commented out X-Frame-Options, updated Content-Security-Policy header |
| TEKDB/explore/tests/test_views.py | Switched from fixture list to import_fixture_file, added join import |
| TEKDB/TEKDB/tests/test_views.py | Added JSON content-type/permission remapping helpers and import_fixture_file |
| TEKDB/TEKDB/tests/test_admin.py | Rewrote media bulk upload tests using RequestFactory and admin API |
| TEKDB/TEKDB/settings.py | Updated VERSION from 2.2.0 to 2.2.2 |
| TEKDB/TEKDB/models.py | Added DefaultModel, changed many models to inherit new bases |
Comments suppressed due to low confidence (5)
TEKDB/TEKDB/models.py:294
- [nitpick] The base class name
Lookupis very generic and may collide with other concepts. Consider a more descriptive name, such asLookupModelBaseorAbstractLookup.
class Lookup(DefaultModel, DefaultModeratedModel, ModeratedModel):
TEKDB/TEKDB/tests/test_views.py:287
- The
PlaceMapTestis fully commented out, leaving no coverage for theplaceMapview. Either reinstate or replace this test to ensure the endpoint remains verified.
### 2025-05-09: No one has any idea what a 'placeMap' is.
deployment/tekdb_nginx.conf:7
- By commenting out the
X-Frame-Optionsheader, clickjacking protection is disabled unless covered by CSP. Consider removing the comment to restore it or ensure CSPframe-ancestorscovers all hosts securely.
# add_header X-Frame-Options "SAMEORIGIN";
TEKDB/explore/tests/test_views.py:9
- The import path
TEKDB.tests.test_viewsdoesn't match the actual module location (TEKDB/TEKDB/tests/test_views.py). Update to the correct module path so the helper can be found.
from TEKDB.tests.test_views import import_fixture_file
TEKDB/explore/tests/test_views.py:20
- The
settingsmodule is not imported in this file, which will cause aNameError. Addfrom django.conf import settingsat the top.
import_fixture_file(join(settings.BASE_DIR, 'TEKDB', 'fixtures', 'all_dummy_data.json'))
…t clickjacking -- Content-Security-Policy may not be enough
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.