dav_events: added tests for ChoiceSet
Run tests / Execute tox to run the test suite (push) Successful in 3m29s

This commit is contained in:
2026-06-10 14:25:03 +02:00
parent d8807a6bbc
commit f116d7b3bd
2 changed files with 193 additions and 0 deletions
+2
View File
@@ -10,6 +10,8 @@ class ChoiceSet(object):
self._codes = list()
self._labels = dict()
for code, label in choices:
if code in self._codes:
raise ValueError(u'Code not unique: {}'.format(code))
self._codes.append(code)
self._labels[code] = label