daisylb / bridgekeeper

Django permissions, but with QuerySets
https://bridgekeeper.leigh.party/
MIT License
42 stars 14 forks source link

Write some property-based tests #1

Open daisylb opened 6 years ago

daisylb commented 6 years ago

Ideally, I'd like to have a couple of tests that use Hypothesis to generate arbitrary predicates and then assert some invariants about them (things like the consistency of filter() vs apply(), invariants to do with UNIVERSAL and EMPTY, the correctness of the And, Or and Not predicates, and so on). Writing the strategies for this might be a bit complicated though.