mirror of
https://github.com/django/django.git
synced 2025-08-02 18:13:02 +00:00
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
This commit is contained in:
parent
4bb70cbcc6
commit
321e94fa41
185 changed files with 1216 additions and 1528 deletions
|
@ -21,7 +21,6 @@ class RecursiveM2MTests(TestCase):
|
|||
self.d.friends.add(self.a, self.c)
|
||||
|
||||
def test_recursive_m2m_all(self):
|
||||
""" Test that m2m relations are reported correctly """
|
||||
# Who is friends with Anne?
|
||||
self.assertQuerysetEqual(
|
||||
self.a.friends.all(), [
|
||||
|
@ -59,8 +58,6 @@ class RecursiveM2MTests(TestCase):
|
|||
)
|
||||
|
||||
def test_recursive_m2m_reverse_add(self):
|
||||
""" Test reverse m2m relation is consistent """
|
||||
|
||||
# Bill is already friends with Anne - add Anne again, but in the
|
||||
# reverse direction
|
||||
self.b.friends.add(self.a)
|
||||
|
@ -84,8 +81,6 @@ class RecursiveM2MTests(TestCase):
|
|||
)
|
||||
|
||||
def test_recursive_m2m_remove(self):
|
||||
""" Test that we can remove items from an m2m relationship """
|
||||
|
||||
# Remove Anne from Bill's friends
|
||||
self.b.friends.remove(self.a)
|
||||
|
||||
|
@ -104,8 +99,6 @@ class RecursiveM2MTests(TestCase):
|
|||
)
|
||||
|
||||
def test_recursive_m2m_clear(self):
|
||||
""" Tests the clear method works as expected on m2m fields """
|
||||
|
||||
# Clear Anne's group of friends
|
||||
self.a.friends.clear()
|
||||
|
||||
|
@ -132,8 +125,6 @@ class RecursiveM2MTests(TestCase):
|
|||
)
|
||||
|
||||
def test_recursive_m2m_add_via_related_name(self):
|
||||
""" Tests that we can add m2m relations via the related_name attribute """
|
||||
|
||||
# David is idolized by Anne and Chuck - add in reverse direction
|
||||
self.d.stalkers.add(self.a)
|
||||
|
||||
|
@ -152,8 +143,7 @@ class RecursiveM2MTests(TestCase):
|
|||
)
|
||||
|
||||
def test_recursive_m2m_add_in_both_directions(self):
|
||||
""" Check that adding the same relation twice results in a single relation """
|
||||
|
||||
"""Adding the same relation twice results in a single relation."""
|
||||
# Ann idolizes David
|
||||
self.a.idols.add(self.d)
|
||||
|
||||
|
@ -173,8 +163,6 @@ class RecursiveM2MTests(TestCase):
|
|||
self.assertEqual(self.a.idols.all().count(), 1)
|
||||
|
||||
def test_recursive_m2m_related_to_self(self):
|
||||
""" Check the expected behavior when an instance is related to itself """
|
||||
|
||||
# Ann idolizes herself
|
||||
self.a.idols.add(self.a)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue