'An atomic operation is properly rolled back inside a non-atomic
migration.'

@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_atomic_operation'})
def test_atomic_operation_in_non_atomic_migration(self):

    executor = MigrationExecutor(connection)
    with self.assertRaisesMessage(RuntimeError, 'Abort    migration'):
        executor.migrate([('migrations', '0001_initial')])
    migrations_apps = executor.loader.project_state(('migrations', '0001_initial')).apps
    Editor = migrations_apps.get_model('migrations', 'Editor')
    self.assertFalse(Editor.objects.exists())
