Ticket #77 (closed enhancement: invalid)
a test for unique=True and duplicated entries
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | |
| Component: | core | Version: | |
| Keywords: | unique, integrity, test | Cc: |
Description
This is a test for the unique=True attribute and for the insertion of duplicated entries.
It creates a table called Individual with the name attribute, which should be unique. Then it tries to insert two records with the same .name attribute and checks whether an IntegrityError is returned.
I couldn't find many examples on unique fields in the docs, so I thought to send you this one.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
