Mercurial > p > roundup > code
comparison roundup/cgi/actions.py @ 5814:bd6d41f21a5a
More extensive EditCSV testing.
Uses test object to cover all types defined by database.
Also check for an error with a row that's too short.
CSV starts with blank line to verify that it recognises header line.
Changes password, date, int, link and other fields.
Deletes row and verified that it is retired.
Make actions.py properly handle emptying of password field.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 14 Jun 2019 21:26:19 -0400 |
| parents | 1a835db41674 |
| children | 883c9e90b403 |
comparison
equal
deleted
inserted
replaced
| 5813:4b2c6f7bc9b4 | 5814:bd6d41f21a5a |
|---|---|
| 556 d[name] = value | 556 d[name] = value |
| 557 elif exists: | 557 elif exists: |
| 558 # nuke the existing value | 558 # nuke the existing value |
| 559 if isinstance(prop, hyperdb.Multilink): | 559 if isinstance(prop, hyperdb.Multilink): |
| 560 d[name] = [] | 560 d[name] = [] |
| 561 elif isinstance(prop, hyperdb.Password): | |
| 562 # create empty password entry | |
| 563 d[name] = password.Password("", config=self.db.config) | |
| 561 else: | 564 else: |
| 562 d[name] = None | 565 d[name] = None |
| 563 | 566 |
| 564 # perform the edit | 567 # perform the edit |
| 565 if exists: | 568 if exists: |
