Skip to content

Commit

Permalink
Added test case for duplicated field keys/values based on calling upd…
Browse files Browse the repository at this point in the history
…ate more then once ISSUE,

I'll fix that now
  • Loading branch information
projekt01 committed Feb 21, 2009
1 parent 3c491d7 commit 6ad4ce7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/z3c/form/field.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,29 @@ in a particular order:
>>> manager.keys()
['id', 'lastName', 'firstName']



ISSUE: duplicated key, values if update ge called more then once.
NOTE: I'll fix this today.

>>> keys = list(manager.keys())
>>> values = list(manager.values())
>>> data = dict(manager._data)

>>> manager.update()
>>> manager.keys()
['id', 'lastName', 'firstName', 'id', 'lastName', 'firstName']

set values back to manager since the test will get otherwise messup

>>> manager._data_keys = keys
>>> manager._data_values = values
>>> manager._data = data

END ISSUE



Let's make sure that all enumerable mapping functions work correctly:

>>> manager['lastName']
Expand Down

0 comments on commit 6ad4ce7

Please sign in to comment.