From bc9be72bdc9bb4dfc7f967ac3856115f0a6166b8 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Sun, 30 Mar 2014 01:57:28 +0700 Subject: Fixed transaction handling for a number of operations on related objects. Thanks Anssi and Aymeric for the reviews. Refs #21174. --- tests/many_to_many/tests.py | 5 ++++- tests/multiple_database/tests.py | 15 ++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/many_to_many/tests.py b/tests/many_to_many/tests.py index 4293fc0c42..545d50a90e 100644 --- a/tests/many_to_many/tests.py +++ b/tests/many_to_many/tests.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals +from django.db import transaction from django.test import TestCase from django.utils import six @@ -54,7 +55,9 @@ class ManyToManyTests(TestCase): # Adding an object of the wrong type raises TypeError with six.assertRaisesRegex(self, TypeError, "'Publication' instance expected, got