beginnings of a test suite #38
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
i'm making this PR to get some feedback. What i did so far is essentially plagiarize some of the django_polymorphic test suite. My plan is to eventually add in mptt-related tests as well.
i'd like some input on what types of tests are going to be really necessary. So far, for example, i'm basically duplicating test cases from django_polymorphic so far. (You'll notice that one of them fails, which i believe may be evidence that django-polymorphic-tree diverges in that case). i presume at least some of the polymorphic tests aren't going to be necessary; perhaps some of their regression tests.
At the moment, i'm leveraging ShowFieldType from the polymorphic app, which seems helpful, but all the mptt fields (as well as how the field ordering works out) is pretty verbose. Also, i don't know the advisability of dependencies on other test suites, although strictly speaking, ShowFieldType isn't in django_polymorphic's tests module.
i'm planning to add additonal files in the tests module like test_admin.py, etc.
Is there an alternate approach to porting the polymorphic and mptt tests into our app?