mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-05-24 08:40:31 -04:00
Fix formatting inconsistencies in comments for sync endpoint tests
This commit is contained in:
2
.github/skills/code-standards/SKILL.md
vendored
2
.github/skills/code-standards/SKILL.md
vendored
@@ -13,7 +13,7 @@ description: NetAlertX coding standards and conventions. Use this when writing c
|
||||
- follow DRY principle - maintainability of code is more important than speed of implementation
|
||||
- code files should be less than 500 LOC for better maintainability
|
||||
- DB columns must not contain underscores, use camelCase instead (e.g., deviceInstanceId, not device_instance_id)
|
||||
- treat DB as temporary storage for stats, long term configuration should be stored in the `/config` folder, the `/config` folder should allow you to restore most of your functionality (excluding historical data)
|
||||
- treat DB as temporary storage for stats, long-term configuration should be stored in the `/config` folder, the `/config` folder should allow you to restore most of your functionality (excluding historical data)
|
||||
- never access DB directly from application layers, always use helper functions in `server/db/db_helper.py` and implement new functionality in handlers (e.g., `DeviceInstance` in `server/models/device_instance.py`)
|
||||
- always validate and normalize MAC addresses before writing to DB (use `normalize_mac` from `plugin_helper.py`)
|
||||
- all subprocess calls must set explicit timeouts
|
||||
|
||||
@@ -40,7 +40,7 @@ def auth_headers(token):
|
||||
|
||||
|
||||
# ========================================================================
|
||||
# POST /sync – authentication
|
||||
# POST /sync - authentication
|
||||
# ========================================================================
|
||||
|
||||
def test_sync_post_no_token_is_forbidden(client):
|
||||
@@ -54,7 +54,7 @@ def test_sync_post_invalid_token_is_forbidden(client):
|
||||
|
||||
|
||||
# ========================================================================
|
||||
# POST /sync – content-type enforcement
|
||||
# POST /sync - content-type enforcement
|
||||
# Regression: node used to send data= (form-encoded); validation rejects it.
|
||||
# ========================================================================
|
||||
|
||||
@@ -111,7 +111,7 @@ def test_sync_post_json_body_writes_encoded_file(client, api_token, tmp_path):
|
||||
|
||||
|
||||
# ========================================================================
|
||||
# GET /sync – authentication
|
||||
# GET /sync - authentication
|
||||
# ========================================================================
|
||||
|
||||
def test_sync_get_no_token_is_forbidden(client):
|
||||
|
||||
Reference in New Issue
Block a user