summaryrefslogtreecommitdiff
path: root/tests/regressiontests/db_typecasts
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-09-09 19:22:28 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-09-09 19:22:28 +0000
commit7deb25b8dd5aa1ed02b5e30cbc67cd1fb0c3d6e6 (patch)
tree09ed3208f309d71b5710b8287bccdb92ddf40c58 /tests/regressiontests/db_typecasts
parente55bbf4c3c42b17d52c21bc3a460b4981fdc190c (diff)
Fixed #7596. Added Model.objects.bulk_create, and make use of it in several places. This provides a performance benefit when inserting multiple objects. THanks to Russ for the review, and Simon Meers for the MySQl implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/db_typecasts')
-rw-r--r--tests/regressiontests/db_typecasts/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/db_typecasts/tests.py b/tests/regressiontests/db_typecasts/tests.py
index 8c71c8f809..1d3bbfa101 100644
--- a/tests/regressiontests/db_typecasts/tests.py
+++ b/tests/regressiontests/db_typecasts/tests.py
@@ -53,10 +53,10 @@ TEST_CASES = {
class DBTypeCasts(unittest.TestCase):
def test_typeCasts(self):
- for k, v in TEST_CASES.items():
+ for k, v in TEST_CASES.iteritems():
for inpt, expected in v:
got = getattr(typecasts, k)(inpt)
- assert got == expected, "In %s: %r doesn't match %r. Got %r instead." % (k, inpt, expected, got)
+ self.assertEqual(got, expected, "In %s: %r doesn't match %r. Got %r instead." % (k, inpt, expected, got))
if __name__ == '__main__':
unittest.main()