dav_events: added tests for ChoiceSet
Run tests / Execute tox to run the test suite (push) Successful in 3m29s
Run tests / Execute tox to run the test suite (push) Successful in 3m29s
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user