mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
This commit is contained in:
@@ -60,7 +60,7 @@ class SitesFrameworkTests(TestCase):
|
||||
|
||||
@override_settings(ALLOWED_HOSTS=['example.com'])
|
||||
def test_get_current_site(self):
|
||||
# Test that the correct Site object is returned
|
||||
# The correct Site object is returned
|
||||
request = HttpRequest()
|
||||
request.META = {
|
||||
"SERVER_NAME": "example.com",
|
||||
@@ -70,7 +70,7 @@ class SitesFrameworkTests(TestCase):
|
||||
self.assertIsInstance(site, Site)
|
||||
self.assertEqual(site.id, settings.SITE_ID)
|
||||
|
||||
# Test that an exception is raised if the sites framework is installed
|
||||
# An exception is raised if the sites framework is installed
|
||||
# but there is no matching Site
|
||||
site.delete()
|
||||
with self.assertRaises(ObjectDoesNotExist):
|
||||
@@ -265,9 +265,9 @@ class CreateDefaultSiteTests(TestCase):
|
||||
#17415 - Another site can be created right after the default one.
|
||||
|
||||
On some backends the sequence needs to be reset after saving with an
|
||||
explicit ID. Test that there isn't a sequence collisions by saving
|
||||
another site. This test is only meaningful with databases that use
|
||||
sequences for automatic primary keys such as PostgreSQL and Oracle.
|
||||
explicit ID. There shouldn't be a sequence collisions by saving another
|
||||
site. This test is only meaningful with databases that use sequences
|
||||
for automatic primary keys such as PostgreSQL and Oracle.
|
||||
"""
|
||||
create_default_site(self.app_config, verbosity=0)
|
||||
Site(domain='example2.com', name='example2.com').save()
|
||||
@@ -309,7 +309,7 @@ class CreateDefaultSiteTests(TestCase):
|
||||
class MiddlewareTest(TestCase):
|
||||
|
||||
def test_old_style_request(self):
|
||||
""" Makes sure that the request has correct `site` attribute. """
|
||||
"""The request has correct `site` attribute."""
|
||||
middleware = CurrentSiteMiddleware()
|
||||
request = HttpRequest()
|
||||
middleware.process_request(request)
|
||||
|
||||
Reference in New Issue
Block a user