diff options
Diffstat (limited to 'tests/bulk_create/tests.py')
| -rw-r--r-- | tests/bulk_create/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py index 6b3e0bedc4..2439050623 100644 --- a/tests/bulk_create/tests.py +++ b/tests/bulk_create/tests.py @@ -108,7 +108,8 @@ class BulkCreateTests(TestCase): """ valid_country = Country(name='Germany', iso_two_letter='DE') invalid_country = Country(id=0, name='Poland', iso_two_letter='PL') - with self.assertRaises(ValueError): + msg = 'The database backend does not accept 0 as a value for AutoField.' + with self.assertRaisesMessage(ValueError, msg): Country.objects.bulk_create([valid_country, invalid_country]) def test_batch_same_vals(self): |
