Ticket #22144: 22144.diff

File 22144.diff, 1.1 KB (added by Mariusz Felisiak, 8 years ago)
  • tests/bulk_create/models.py

    diff --git a/tests/bulk_create/models.py b/tests/bulk_create/models.py
    index b98ce4a..213d701 100644
    a b except ImportError:  
    1313
    1414class Country(models.Model):
    1515    name = models.CharField(max_length=255)
     16    description = models.TextField()
    1617    iso_two_letter = models.CharField(max_length=2)
    1718
    1819
  • tests/bulk_create/tests.py

    diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py
    index f401d4e..85aa6d4 100644
    a b class BulkCreateTests(TestCase):  
    3939        with self.assertNumQueries(1):
    4040            Country.objects.bulk_create(self.data)
    4141
     42    @skipUnlessDBFeature('has_bulk_insert')
     43    def test_oracle_long_text_edge_case(self):
     44        """Ticket 22144."""
     45        Country.objects.bulk_create([Country(description='Ж'*3000)])
     46
    4247    def test_multi_table_inheritance_unsupported(self):
    4348        expected_message = "Can't bulk create a multi-table inherited model"
    4449        with self.assertRaisesMessage(ValueError, expected_message):
Back to Top