Changes between Version 4 and Version 5 of Ticket #31416, comment 16


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31416, comment 16

    v4 v5  
    66And 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.
    77
    8 It seems to me that there is probably something that reorders the order of the action operations before it prints out action operations executed in the console. In this case, it should've been `["RemoveField", "RemoveField", "CreateModel", "CreateModel"]`
     8It seems to me that there is probably something that reorders the order of the action operations before it prints out action operations executed in the console. In this case, it should've been `["RemoveField", "RemoveField", "CreateModel", "CreateModel"]`, but currently it is `["CreateModel", "CreateModel", "RemoveField", "RemoveField"]`. But the program is still able to solve the issue. How am i supposed to write test cases for that?
Back to Top