Commit Graph

5 Commits

Author SHA1 Message Date
IluaAir
d329ddc4ad Add unit tests for device registry model parsing
- Introduced a new test file `test_models.py` to implement unit tests for various device models in the `device_registry`.
- Added parameterized tests to validate the parsing of device configurations against expected JSON outputs and to ensure required sections are present in the parsed models.
- Enhanced test coverage for multiple device types including Mikrotik, Keenetic, Qtech, Huawei, Eltex, and Quasar.
2026-06-06 13:55:51 +03:00
IluaAir
229bef99f6 Add UTF-8 decoding utility and corresponding unit tests
- Introduced a new utility function `decode_utf` in `utils.py` to decode escaped UTF-8 descriptions.
- Updated unit tests in `test_units.py` to include tests for the `decode_utf` function, covering plain text and escaped UTF-8 scenarios.
- Refactored existing tests to streamline the usage of the `expand_vlan_range` function.
2026-06-06 13:55:01 +03:00
IluaAir
f446ae52e7 Add VLAN range expansion utility and corresponding unit tests
- Introduced a new utility function `expand_vlan_range` in `utils.py` to expand VLAN range strings into individual VLAN IDs.
- Created a new test file `test_units.py` with unit tests for the `expand_vlan_range` function, covering various scenarios including simple ranges, reversed ranges, non-numeric inputs, and list inputs.
- Enhanced test coverage for other functionalities in the `device_registry` and template validation classes.
2026-06-06 13:49:55 +03:00
IluaAir
bebbe78163 Add unit tests for OxiAPI node functionality
- Introduced a new test file `test_network.py` to implement unit tests for the `OxiAPI` class.
- Added tests for node retrieval, configuration fetching, error handling for missing nodes, and response status checks.
- Utilized the `responses` library to mock API responses for comprehensive testing of various scenarios, including successful retrieval and error cases.
2026-06-06 11:13:32 +03:00
IluaAir
a55fc938f0 Add optional dependencies for development and update .gitignore
- Added `.DS_Store` to `.gitignore` to prevent macOS system files from being tracked.
- Introduced optional development dependencies in `pyproject.toml`, including `pytest` and `responses`, to facilitate testing and development.
- Updated `uv.lock` with new package dependencies and versions for improved compatibility and functionality.
- Created new test files `conftest.py` and `test_view.py` to establish testing fixtures and implement unit tests for the `ModelView` class.
2026-06-06 11:06:03 +03:00