django-daiquiri / daiquiri

A framework for the publication of scientific databases
https://escience.aip.de/daiquiri
Apache License 2.0
26 stars 8 forks source link

Add form honeypot #142

Closed triole closed 1 year ago

kimakan commented 1 year ago

For the test I would expect some kind of a failing case. For example, a case where the honeypot field is not empty. Does it make sense to include such a test?

agy-why commented 1 year ago

I agree with @kimakan. It would be nice not only to test that we do not break our forms but also that we correctly use the middleware and verify that providing a filled phone field returns a 404.

triole commented 1 year ago

Yes, I agree. We should add honeypot tests which respond with a 400 if the field is not filled correctly or missing. I added these two.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4043234877


Totals Coverage Status
Change from base Build 3995188500: 0.005%
Covered Lines: 4653
Relevant Lines: 7247

💛 - Coveralls