diff --git a/tests/bulk_create/models.py b/tests/bulk_create/models.py
index fcc4b41..3084249 100644
a
|
b
|
class State(models.Model):
|
28 | 28 | class TwoFields(models.Model): |
29 | 29 | f1 = models.IntegerField(unique=True) |
30 | 30 | f2 = models.IntegerField(unique=True) |
| 31 | |
| 32 | |
| 33 | class NoFields(models.Model): |
| 34 | pass |
diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py
index 8648184..5feff72 100644
a
|
b
|
from django.db import connection
|
6 | 6 | from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature |
7 | 7 | from django.test import override_settings |
8 | 8 | |
9 | | from .models import Country, Restaurant, Pizzeria, State, TwoFields |
| 9 | from .models import Country, Restaurant, Pizzeria, State, TwoFields, NoFields |
10 | 10 | |
11 | 11 | |
12 | 12 | class BulkCreateTests(TestCase): |
… |
… |
class BulkCreateTests(TestCase):
|
164 | 164 | TwoFields.objects.all().delete() |
165 | 165 | with self.assertNumQueries(1): |
166 | 166 | TwoFields.objects.bulk_create(objs, len(objs)) |
| 167 | |
| 168 | def test_empty_model(self): |
| 169 | objs = [NoFields() for i in range(3)] |
| 170 | NoFields.objects.bulk_create(objs) |