mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add RenameChoices user action
Summary:
["RenameChoices", table_id, col_id, renames]
Updates the data in a Choice/ChoiceList column to reflect the new choice names.
`renames` should be a dict of `{old_choice_name: new_choice_name}`.
This doesn't touch the choices configuration in widgetOptions, that must be done separately.
Frontend to be done in another diff.
Test Plan: Added two Python unit tests.
Reviewers: jarek
Reviewed By: jarek
Differential Revision: https://phab.getgrist.com/D3050
This commit is contained in:
@@ -3,6 +3,7 @@ import functools
|
||||
import json
|
||||
import unittest
|
||||
from collections import namedtuple
|
||||
from pprint import pprint
|
||||
|
||||
import six
|
||||
|
||||
@@ -203,7 +204,10 @@ class EngineTestCase(unittest.TestCase):
|
||||
"""
|
||||
Prints out_actions in human-readable format, for help in writing / debugging tets.
|
||||
"""
|
||||
print("\n".join(self._formatActionGroup(out_actions.__dict__)))
|
||||
pprint({
|
||||
k: [get_comparable_repr(action) for action in getattr(out_actions, k)]
|
||||
for k in self.action_group_action_fields
|
||||
})
|
||||
|
||||
def assertTableData(self, table_name, data=[], cols="all", rows="all", sort=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user