Changes between Version 1 and Version 2 of Ticket #31416, comment 16


Ignore:
Timestamp:
Apr 18, 2020, 4:08:08 AM (5 years ago)
Author:
Nan Liu

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31416, comment 16

    v1 v2  
    44I'm not sure whether I should put tests in `test_autoencoder` or `test_operations` since the issue is related to adjusting autoencoder as well as operations swapping. My intuition tells me that I should add some tests in `test_operations.py` since we want to swap operations so that field removals of bases can take place before newly added sub-models can be created, but I just thought it would be always good to ask here. much appreciated!
    55
    6 And for this test, i need to do two separate migrations in `app`, then how can i do it in unit tests since `self.get_change` will only have one migration when i do `self.get_change([Readable], [Readable_with_no_fields, Book, Magazine])`.
     6And for this test, i need to do two separate migrations in `app`, then how can i do it in unit tests since `self.get_change` will only have one migration when i do `self.get_change([Readable], [Readable_with_no_fields, Book, Magazine])`. When I do local testings, two separate migrations(one is to create `Readable` with fields `title` and `name`, second one is to remove fields from `Readable` and add these two fields into inheriting models like `Book`, `Magazine`), will solve the issue. But if i do `self.get_change([Readable], [Readable_with_no_fields, Book, Magazine])`, the test case tells me that models are created before base fields are removed, which is different from what i have on local testings.
Back to Top