Commit Graph

6 Commits (3f6d94139c95d36685cd3d19d86d27db3143f907)

Author SHA1 Message Date
Diederik van der Boor 04d4181e17 Added `get_base_polymorphic_model()` to detect the common base class for a polymorphic model. 2017-09-30 16:21:21 +02:00
Hugo Osvaldo Barrera e102a0502c Update a bunch of failing tests
Tests were failing because of:

* Models weren't being imported from their new location.
* PolymorphicManager doesn't work with non-polymorphic models, but
  migrations run models' manager, so having MROBase3 with
  PolymorphicManager failed.
* Some tests failed due to have assertions were being done (since they
  hardcoded expected instance ids). Update tests to use comparisons
  similar to #312
2017-09-06 20:06:25 -03:00
Hugo Osvaldo Barrera 80b4f2bb41 Fix failing tests with django/master
Several tests were failing with django master. This is because,
apparently, IDs don't match those expected in tests, and other
test-related details.

Replace all test comparisons with assertQuerysetEqual, which is safer
and cleaner for the sort of comparison we're doing.
2017-09-06 22:41:13 +03:00
Jerome Leclanche 3af5db0ceb tests: Clean up and simplify test_reset_polymorphic_ctype 2017-08-29 19:41:42 +03:00
Diederik van der Boor 77797bfa12 Ensure consistent ordering in testing reset_polymorphic_ctype
Amends: 171d14f369
2017-08-01 13:51:42 +02:00
Diederik van der Boor 171d14f369 Improve reset_polymorphic_ctype() for reliability and test it.
This function can now be safely used on a set of models.
2017-08-01 12:17:10 +02:00