'Makes sure ProjectState doesn\'t include OrderWrt fields when
making from existing models.'

def test_ignore_order_wrt(self):

    new_apps = Apps()
    class Author(models.Model, ):
        name = models.TextField()
        class Meta:
            app_label = 'migrations'
            apps = new_apps
    class Book(models.Model, ):
        author = models.ForeignKey(Author, models.CASCADE)
        class Meta:
            app_label = 'migrations'
            apps = new_apps
            order_with_respect_to = 'author'
    project_state = ProjectState()
    project_state.add_model(ModelState.from_model(Author))
    project_state.add_model(ModelState.from_model(Book))
    self.assertEqual([name for (name, field) in project_state.models[('migrations', 'book')].fields], ['id', 'author'])
