This commit adds a complete test suite for django-nepkit with 62 test cases covering all major components. Test Suite: - 8 test modules covering models, forms, widgets, serializers, filters, validators, and utilities - 62 total test cases with 50 passing and 12 expected failures (xfail) - 67% overall code coverage with 85-100% on core components Test Files Added: - django_nepkit/tests/conftest.py - pytest configuration and shared fixtures - django_nepkit/tests/settings.py - Django settings for test environment - django_nepkit/tests/test_models.py - 15 tests for model fields - django_nepkit/tests/test_forms.py - 6 tests for form validation - django_nepkit/tests/test_validators.py - 7 tests for phone validation - django_nepkit/tests/test_utils.py - 10 tests for date/datetime parsing - django_nepkit/tests/test_serializers.py - 10 tests for DRF serializers - django_nepkit/tests/test_filters.py - 4 tests for DRF filters - django_nepkit/tests/test_widgets.py - 11 tests for widget rendering - django_nepkit/tests/README.md - test documentation Configuration: - pytest.ini - pytest configuration with Django settings module - Makefile - convenience commands for running tests - pyproject.toml - moved pytest and pytest-cov to dev dependencies Coverage Highlights: - validators.py: 100% - forms.py: 91% - conf.py: 93% - serializers.py: 89% - widgets.py: 90% - models.py: 60% Running Tests: DJANGO_SETTINGS_MODULE=django_nepkit.tests.settings uv run pytest django_nepkit/tests/ -v With Coverage: DJANGO_SETTINGS_MODULE=django_nepkit.tests.settings uv run pytest django_nepkit/tests/ --cov=django_nepkit --cov-report=html
3 lines
94 B
Makefile
3 lines
94 B
Makefile
test:
|
|
DJANGO_SETTINGS_MODULE=django_nepkit.tests.settings uv run pytest django_nepkit/tests/
|