Loading tests/get_or_create/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ class UpdateOrCreateTests(TestCase): self.assertRaises(IntegrityError, Person.objects.update_or_create, first_name="Tom", last_name="Smith") def test_mananual_primary_key_test(self): def test_manual_primary_key_test(self): # If you specify an existing primary key, but different other fields, # then you will get an error and data will not be updated. ManualPrimaryKeyTest.objects.create(id=1, data="Original") Loading tests/transactions/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ class AtomicMergeTests(TransactionTestCase): Reporter.objects.create(first_name="Archibald", last_name="Haddock") with six.assertRaisesRegex(self, Exception, "Oops"): with transaction.atomic(savepoint=False): Reporter.objects.create(first_name="Tournesol") Reporter.objects.create(first_name="Calculus") raise Exception("Oops, that's his last name") # It wasn't possible to roll back self.assertEqual(Reporter.objects.count(), 3) Loading @@ -281,7 +281,7 @@ class AtomicMergeTests(TransactionTestCase): Reporter.objects.create(first_name="Archibald", last_name="Haddock") with six.assertRaisesRegex(self, Exception, "Oops"): with transaction.atomic(savepoint=False): Reporter.objects.create(first_name="Tournesol") Reporter.objects.create(first_name="Calculus") raise Exception("Oops, that's his last name") # It wasn't possible to roll back self.assertEqual(Reporter.objects.count(), 3) Loading Loading
tests/get_or_create/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ class UpdateOrCreateTests(TestCase): self.assertRaises(IntegrityError, Person.objects.update_or_create, first_name="Tom", last_name="Smith") def test_mananual_primary_key_test(self): def test_manual_primary_key_test(self): # If you specify an existing primary key, but different other fields, # then you will get an error and data will not be updated. ManualPrimaryKeyTest.objects.create(id=1, data="Original") Loading
tests/transactions/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ class AtomicMergeTests(TransactionTestCase): Reporter.objects.create(first_name="Archibald", last_name="Haddock") with six.assertRaisesRegex(self, Exception, "Oops"): with transaction.atomic(savepoint=False): Reporter.objects.create(first_name="Tournesol") Reporter.objects.create(first_name="Calculus") raise Exception("Oops, that's his last name") # It wasn't possible to roll back self.assertEqual(Reporter.objects.count(), 3) Loading @@ -281,7 +281,7 @@ class AtomicMergeTests(TransactionTestCase): Reporter.objects.create(first_name="Archibald", last_name="Haddock") with six.assertRaisesRegex(self, Exception, "Oops"): with transaction.atomic(savepoint=False): Reporter.objects.create(first_name="Tournesol") Reporter.objects.create(first_name="Calculus") raise Exception("Oops, that's his last name") # It wasn't possible to roll back self.assertEqual(Reporter.objects.count(), 3) Loading