def __exit__(self, *args): ''' Remove the tables from our database ''' with connection.schema_editor() as editor: for Model in reversed(self.models): editor.delete_model(Model)