diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-22 21:18:53 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-22 21:18:53 +0000 |
| commit | f82e64c6b2ade3e70553b3ec2743dfaa7456ddb3 (patch) | |
| tree | 5b4f6fa0f8d5c1f9d7b9348c0e0a6c793789c155 /tests | |
| parent | 411625a76101fd96f32159a3408f6735bdfd0af5 (diff) | |
Fixed #681 -- get_in_bulk no longer assumes PK fields are called id. Also added unit tests to confirm. Thanks, Jeremy Dunck
git-svn-id: http://code.djangoproject.com/svn/django/trunk@991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/testapp/models/custom_pk.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testapp/models/custom_pk.py b/tests/testapp/models/custom_pk.py index 234b5c3308..5b0eb45462 100644 --- a/tests/testapp/models/custom_pk.py +++ b/tests/testapp/models/custom_pk.py @@ -53,6 +53,8 @@ EmployeeDoesNotExist: Employee does not exist for {'pk': 'foo'} >>> fran.save() >>> employees.get_list(last_name__exact='Jones') [Dan Jones, Fran Jones] +>>> employees.get_in_bulk(['ABC123', 'XYZ456']) +{'XYZ456': Fran Jones, 'ABC123': Dan Jones} >>> b = businesses.Business(name='Sears') >>> b.save() @@ -62,4 +64,6 @@ True [Dan Jones, Fran Jones] >>> fran.get_business_list() [Sears] +>>> businesses.get_in_bulk(['Sears']) +{'Sears': Sears} """ |
