'AddField should NOT optimize into CreateModel if it\'s an FK to a model
that\'s between them.'

def test_create_model_add_field_not_through_fk(self):

    self.assertDoesNotOptimize([migrations.CreateModel('Foo', [('name', models.CharField(max_length=255))]), migrations.CreateModel('Link', [('url', models.TextField())]), migrations.AddField('Foo', 'link', models.ForeignKey('migrations.Link', models.CASCADE))])
