mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33733 -- Preserved wrapper assignment for manager methods.
This commit is contained in:
committed by
Mariusz Felisiak
parent
0982cf2a01
commit
46efd03d26
@@ -1,3 +1,4 @@
|
||||
import inspect
|
||||
import threading
|
||||
from datetime import datetime, timedelta
|
||||
from unittest import mock
|
||||
@@ -740,6 +741,13 @@ class ManagerTest(SimpleTestCase):
|
||||
self.assertEqual(Article.objects.get.__doc__, models.QuerySet.get.__doc__)
|
||||
self.assertEqual(Article.objects.count.__name__, models.QuerySet.count.__name__)
|
||||
|
||||
def test_manager_method_signature(self):
|
||||
self.assertEqual(
|
||||
str(inspect.signature(Article.objects.bulk_create)),
|
||||
"(objs, batch_size=None, ignore_conflicts=False, update_conflicts=False, "
|
||||
"update_fields=None, unique_fields=None)",
|
||||
)
|
||||
|
||||
|
||||
class SelectOnSaveTests(TestCase):
|
||||
def test_select_on_save(self):
|
||||
|
||||
Reference in New Issue
Block a user