def delete_in_transaction_fn(): loaded_model = TestModel('test_model_1') load(loaded_model) loaded_list_model = TestListModel('test_list_model_1') load(loaded_list_model) loaded_list_model.l.remove(loaded_model.key) delete(loaded_model) save(loaded_list_model)
def delete_model(): global i prisoner = Prisoner('num_{}'.format(i)) redact.delete(prisoner) i += 1