mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
This commit is contained in:
@@ -72,7 +72,7 @@ class CustomManagerTests(TestCase):
|
||||
self.assertQuerysetEqual(queryset, ["Bugs Bunny"], six.text_type)
|
||||
self.assertIs(queryset._filter_CustomQuerySet, True)
|
||||
|
||||
# Test that specialized querysets inherit from our custom queryset.
|
||||
# Specialized querysets inherit from our custom queryset.
|
||||
queryset = manager.values_list('first_name', flat=True).filter()
|
||||
self.assertEqual(list(queryset), [six.text_type("Bugs")])
|
||||
self.assertIs(queryset._filter_CustomQuerySet, True)
|
||||
@@ -283,7 +283,7 @@ class CustomManagerTests(TestCase):
|
||||
Person.objects.create(first_name="Bugs", last_name="Bunny", fun=True, favorite_book=self.b1)
|
||||
droopy = Person.objects.create(first_name="Droopy", last_name="Dog", fun=False, favorite_book=self.b1)
|
||||
|
||||
# Check that the fun manager DOESN'T remove boring people.
|
||||
# The fun manager DOESN'T remove boring people.
|
||||
self.b1.favorite_books(manager='fun_people').remove(droopy, bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_books(manager='boring_people').all(), [
|
||||
@@ -292,7 +292,7 @@ class CustomManagerTests(TestCase):
|
||||
lambda c: c.first_name,
|
||||
ordered=False,
|
||||
)
|
||||
# Check that the boring manager DOES remove boring people.
|
||||
# The boring manager DOES remove boring people.
|
||||
self.b1.favorite_books(manager='boring_people').remove(droopy, bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_books(manager='boring_people').all(), [
|
||||
@@ -303,7 +303,7 @@ class CustomManagerTests(TestCase):
|
||||
droopy.favorite_book = self.b1
|
||||
droopy.save()
|
||||
|
||||
# Check that the fun manager ONLY clears fun people.
|
||||
# The fun manager ONLY clears fun people.
|
||||
self.b1.favorite_books(manager='fun_people').clear(bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_books(manager='boring_people').all(), [
|
||||
@@ -363,7 +363,7 @@ class CustomManagerTests(TestCase):
|
||||
Person.objects.create(first_name="Bugs", last_name="Bunny", fun=True, favorite_thing=self.b1)
|
||||
droopy = Person.objects.create(first_name="Droopy", last_name="Dog", fun=False, favorite_thing=self.b1)
|
||||
|
||||
# Check that the fun manager DOESN'T remove boring people.
|
||||
# The fun manager DOESN'T remove boring people.
|
||||
self.b1.favorite_things(manager='fun_people').remove(droopy, bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_things(manager='boring_people').all(), [
|
||||
@@ -373,7 +373,7 @@ class CustomManagerTests(TestCase):
|
||||
ordered=False,
|
||||
)
|
||||
|
||||
# Check that the boring manager DOES remove boring people.
|
||||
# The boring manager DOES remove boring people.
|
||||
self.b1.favorite_things(manager='boring_people').remove(droopy, bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_things(manager='boring_people').all(), [
|
||||
@@ -384,7 +384,7 @@ class CustomManagerTests(TestCase):
|
||||
droopy.favorite_thing = self.b1
|
||||
droopy.save()
|
||||
|
||||
# Check that the fun manager ONLY clears fun people.
|
||||
# The fun manager ONLY clears fun people.
|
||||
self.b1.favorite_things(manager='fun_people').clear(bulk=bulk)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.favorite_things(manager='boring_people').all(), [
|
||||
@@ -444,7 +444,7 @@ class CustomManagerTests(TestCase):
|
||||
droopy = Person.objects.create(first_name="Droopy", last_name="Dog", fun=False)
|
||||
self.b1.authors.add(droopy)
|
||||
|
||||
# Check that the fun manager DOESN'T remove boring people.
|
||||
# The fun manager DOESN'T remove boring people.
|
||||
self.b1.authors(manager='fun_people').remove(droopy)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.authors(manager='boring_people').all(), [
|
||||
@@ -454,7 +454,7 @@ class CustomManagerTests(TestCase):
|
||||
ordered=False,
|
||||
)
|
||||
|
||||
# Check that the boring manager DOES remove boring people.
|
||||
# The boring manager DOES remove boring people.
|
||||
self.b1.authors(manager='boring_people').remove(droopy)
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.authors(manager='boring_people').all(), [
|
||||
@@ -464,7 +464,7 @@ class CustomManagerTests(TestCase):
|
||||
)
|
||||
self.b1.authors.add(droopy)
|
||||
|
||||
# Check that the fun manager ONLY clears fun people.
|
||||
# The fun manager ONLY clears fun people.
|
||||
self.b1.authors(manager='fun_people').clear()
|
||||
self.assertQuerysetEqual(
|
||||
self.b1.authors(manager='boring_people').all(), [
|
||||
|
||||
Reference in New Issue
Block a user