'Tests the DeleteModel operation.'

def test_delete_model(self):

    project_state = self.set_up_test_model('test_dlmo')
    operation = migrations.DeleteModel('Pony')
    self.assertEqual(operation.describe(), 'Delete    model    Pony')
    new_state = project_state.clone()
    operation.state_forwards('test_dlmo', new_state)
    self.assertNotIn(('test_dlmo', 'pony'), new_state.models)
    self.assertTableExists('test_dlmo_pony')
    with connection.schema_editor() as editor:
        operation.database_forwards('test_dlmo', editor, project_state, new_state)
    self.assertTableNotExists('test_dlmo_pony')
    with connection.schema_editor() as editor:
        operation.database_backwards('test_dlmo', editor, new_state, project_state)
    self.assertTableExists('test_dlmo_pony')
    definition = operation.deconstruct()
    self.assertEqual(definition[0], 'DeleteModel')
    self.assertEqual(definition[1], [])
    self.assertEqual(list(definition[2]), ['name'])
