Skip to content

teacher: unit tests for parsers + helpers #8

@aaroncorvo

Description

@aaroncorvo

Add unit tests for the small pieces of teacher/teacher.py that are most likely to drift on refactors.

Targets:

  • _default_pos(idx) — grid math
  • _ssh_health JSON parser — confirm it handles warnings before the JSON line
  • FortiGate cookie collector — Set-Cookie header splitting (multiple cookies, with attributes)
  • FortiGate _forti_get 401/403 → marks unauthenticated

Suggested tooling: pytest, plus a tiny fixture for the JSON line scanning.

Not blocking any feature work — file for future cleanup.

Files: new teacher/tests/test_teacher.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions