Commit 6917e2a
committed
Fix legacy test compatibility and achieve 100% test coverage
Fixes for Python 3.8/Django 3.2 compatibility:
- Replace assertQuerySetEqual with assertCountEqual in test_admin_filters.py
(assertQuerySetEqual doesn't exist in older Django versions)
Coverage improvements in test_dynamic_first.py:
- Remove redundant conditional check in _parse_accept_language()
- Add test_empty_accept_language() to cover empty Accept-Language header
- Simplify test_unsupported_language_falls_back() to focus on zh-CN case
Result: 100% test coverage across all test files, all environments pass.1 parent 3b47112 commit 6917e2a
File tree
2 files changed
+31
-22
lines changed- django_countries/tests
2 files changed
+31
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
| |||
260 | 259 | | |
261 | 260 | | |
262 | 261 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
267 | 265 | | |
268 | 266 | | |
269 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
| 563 | + | |
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
670 | 687 | | |
671 | | - | |
| 688 | + | |
672 | 689 | | |
673 | 690 | | |
674 | 691 | | |
675 | | - | |
676 | 692 | | |
677 | | - | |
| 693 | + | |
678 | 694 | | |
| 695 | + | |
| 696 | + | |
679 | 697 | | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
| 698 | + | |
684 | 699 | | |
685 | 700 | | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
| 701 | + | |
| 702 | + | |
692 | 703 | | |
693 | 704 | | |
694 | 705 | | |
| |||
0 commit comments