Added validation for not activated language in the file
Why is this change needed?
Need to add a checker if all language is activated.
How was the change implemented?
Added a validation that checks if all language in the uploaded file is activated.
New unit tests
No new unit tests
Unit tests executed by the author
spp_area/tests/test_area_import.py::AreaImportTest
How to test manually
- Install the module spp_area
- go to Area -> Area Import
Test 1
- Upload the file. make sure that the file have a language that is not activated.
- Click
Importbutton. - Check if there is an error message.
Test 2
- Activate the language.
- Import again the file.
- Check if there is no error message anymore.
Related links
https://github.com/OpenSPP/openspp-modules/issues/464
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 73.23%. Comparing base (
c2d1b67) to head (08826de). Report is 192 commits behind head on 17.0.
Additional details and impacted files
@@ Coverage Diff @@
## 17.0 #566 +/- ##
==========================================
- Coverage 73.50% 73.23% -0.28%
==========================================
Files 560 544 -16
Lines 14084 13622 -462
Branches 1799 1750 -49
==========================================
- Hits 10353 9976 -377
+ Misses 3414 3348 -66
+ Partials 317 298 -19
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code