Closed MrkGrgsn closed 3 years ago
Merging #34 (f89faed) into master (527c1c9) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #34 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 81 81
Branches 16 16
=========================================
Hits 81 81
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 527c1c9...f89faed. Read the comment docs.
Great catch! Thanks @MrkGrgsn.
Description
Previous tests
test_custom_widget
andtest_custom_widget2
failed to override the BLEACH_DEFAULT_WIDGET at the correct time to influence the form being used to test thus the tests were not actually testing with the intended widget class.The reason the old tests were not correct is that
testproject.forms.BleachForm
is evaluated at compile time (with settings as pertestproject.settings
) while the mock only changes the settings when the individual test is run and it is too late.This PR defines a class within the
setUp
method of the test class whileoverride_settings
is in effect.Checklist
tox
to ensure tests pass