Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

models.BleachField's form field set to forms.BleachField #19

Merged
merged 9 commits into from
Jun 21, 2021

Conversation

Alirezaja1384
Copy link
Contributor

@Alirezaja1384 Alirezaja1384 commented Jun 12, 2021

Description

Describe: models.BleachField's form field automtically set to forms.BleachField in ModelForm

References

Fix #13

Checklist

  • I have ran tox to ensure tests pass
  • Usage documentation added in case of new features
  • Tests added / I have not lowered coverage from 100%

@codecov
Copy link

codecov bot commented Jun 12, 2021

Codecov Report

Merging #19 (8a9d286) into master (70f4e21) will decrease coverage by 1.25%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##            master      #19      +/-   ##
===========================================
- Coverage   100.00%   98.75%   -1.25%     
===========================================
  Files            2        3       +1     
  Lines           49       80      +31     
  Branches         8       16       +8     
===========================================
+ Hits            49       79      +30     
- Partials         0        1       +1     
Impacted Files Coverage Δ
forms.py 97.82% <0.00%> (-2.18%) ⬇️
models.py 100.00% <0.00%> (ø)

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 70f4e21...8a9d286. Read the comment docs.

@marksweb
Copy link
Owner

@Alirezaja1384 This needs tests to ensure a model form uses the correct field.

Likely best done by updating the form tests to use the bleach form and a new ModelForm with a model in the test project.

@Alirezaja1384
Copy link
Contributor Author

Ok, I'll do both soon.
Thanks for your review.

@Alirezaja1384
Copy link
Contributor Author

Alirezaja1384 commented Jun 19, 2021

I have added another test for models.py and its coverage is now 100%. But I have no idea about forms.py. Coverage report says line 35->37 are missed, but there are test_default_widget and test_custom_widget tests in test_settings.py.

@marksweb
Copy link
Owner

marksweb commented Jun 19, 2021

@Alirezaja1384 thank you.

The coverage from the github action isn't ran against all files in the app. I raised #20 so that isn't forgotten about.

Essentially I need to find some time to look over things 😂👍

@marksweb marksweb merged commit 0dfcd6d into marksweb:master Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use forms.BleachField when models.BleachField is used
2 participants