summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaxime Lorant <maxime.lorant@gmail.com>2015-08-31 22:14:35 +0200
committerTim Graham <timograham@gmail.com>2015-08-31 17:37:21 -0400
commit5153a3bfdcec82324d67ff79862384288cf6afe6 (patch)
treea03c5ee4bdf3b5b6529df479fbac123a3065d82a /tests
parentd4b10a725614322769a419180039771634a06571 (diff)
Fixed #25331 -- Removed trailing blank lines in docstrings.
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_docs/models.py1
-rw-r--r--tests/admin_docs/tests.py1
-rw-r--r--tests/admin_inlines/tests.py1
-rw-r--r--tests/admin_scripts/tests.py1
-rw-r--r--tests/admin_views/tests.py5
-rw-r--r--tests/apps/tests.py1
-rw-r--r--tests/backends/tests.py2
-rw-r--r--tests/cache/tests.py3
-rw-r--r--tests/delete_regress/tests.py8
-rw-r--r--tests/flatpages_tests/test_forms.py1
-rw-r--r--tests/forms_tests/tests/test_regressions.py1
-rw-r--r--tests/forms_tests/tests/test_widgets.py6
-rw-r--r--tests/model_fields/tests.py5
-rw-r--r--tests/model_formsets_regress/tests.py1
-rw-r--r--tests/queries/tests.py6
-rw-r--r--tests/serializers_regress/tests.py1
-rw-r--r--tests/settings_tests/tests.py2
-rw-r--r--tests/wsgi/tests.py3
18 files changed, 0 insertions, 49 deletions
diff --git a/tests/admin_docs/models.py b/tests/admin_docs/models.py
index 6dff4358c2..9ddcb762e1 100644
--- a/tests/admin_docs/models.py
+++ b/tests/admin_docs/models.py
@@ -34,7 +34,6 @@ class Person(models.Model):
:file: admin_docs/evilfile.txt
.. include:: admin_docs/evilfile.txt
-
"""
first_name = models.CharField(max_length=200, help_text="The person's first name")
last_name = models.CharField(max_length=200, help_text="The person's last name")
diff --git a/tests/admin_docs/tests.py b/tests/admin_docs/tests.py
index b48d33301f..7619e01465 100644
--- a/tests/admin_docs/tests.py
+++ b/tests/admin_docs/tests.py
@@ -389,7 +389,6 @@ class TestUtils(AdminDocsTestCase):
:template:`myapp/my_template.html` (DESCRIPTION)
some_metadata: some data
-
"""
def setUp(self):
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 4ecee471c8..04bd2f06d7 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -477,7 +477,6 @@ class TestInlinePermissions(TestCase):
"""
Make sure the admin respects permissions for objects that are edited
inline. Refs #8060.
-
"""
def setUp(self):
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index c9faa82977..7ba2593e95 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1199,7 +1199,6 @@ class ManageCheck(AdminScriptTestCase):
command should not raise `CommandError` exception.
In this test we also test output format.
-
"""
self.write_settings('settings.py',
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 12241ecb97..79db4a3712 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -2129,7 +2129,6 @@ class AdminViewDeletedObjectsTest(TestCase):
"""
Cyclic relationships should still cause each object to only be
listed once.
-
"""
one = '<li>Cyclic one: <a href="%s">I am recursive</a>' % (
reverse('admin:admin_views_cyclicone_change', args=(self.cy1.pk,)),
@@ -2181,7 +2180,6 @@ class AdminViewDeletedObjectsTest(TestCase):
If a deleted object has two relationships from another model,
both of those should be followed in looking for related
objects to delete.
-
"""
should_contain = '<li>Plot: <a href="%s">World Domination</a>' % reverse(
'admin:admin_views_plot_change', args=(self.pl1.pk,)
@@ -2196,7 +2194,6 @@ class AdminViewDeletedObjectsTest(TestCase):
If a deleted object has two relationships pointing to it from
another object, the other object should still only be listed
once.
-
"""
should_contain = '<li>Plot: <a href="%s">World Peace</a></li>' % reverse(
'admin:admin_views_plot_change', args=(self.pl2.pk,)
@@ -2209,7 +2206,6 @@ class AdminViewDeletedObjectsTest(TestCase):
In the case of an inherited model, if either the child or
parent-model instance is deleted, both instances are listed
for deletion, as well as any relationships they have.
-
"""
should_contain = [
'<li>Villain: <a href="%s">Bob</a>' % reverse('admin:admin_views_villain_change', args=(self.sv1.pk,)),
@@ -2228,7 +2224,6 @@ class AdminViewDeletedObjectsTest(TestCase):
"""
If a deleted object has GenericForeignKeys pointing to it,
those objects should be listed for deletion.
-
"""
plot = self.pl3
tag = FunkyTag.objects.create(content_object=plot, name='hott')
diff --git a/tests/apps/tests.py b/tests/apps/tests.py
index 3dfd88f136..ae8f0c6c92 100644
--- a/tests/apps/tests.py
+++ b/tests/apps/tests.py
@@ -391,7 +391,6 @@ class NamespacePackageAppTests(SimpleTestCase):
(Because then we wouldn't know where to load its templates, static
assets, etc from.)
-
"""
# Temporarily add two directories to sys.path that both contain
# components of the "nsapp" package.
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index b918be3e51..ed42d6317a 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -340,7 +340,6 @@ class DateQuotingTest(TestCase):
#12818__.
__: http://code.djangoproject.com/ticket/12818
-
"""
updated = datetime.datetime(2010, 2, 20)
models.SchoolClass.objects.create(year=2009, last_updated=updated)
@@ -353,7 +352,6 @@ class DateQuotingTest(TestCase):
which clash with strings passed to it (e.g. 'day') - see #12818__.
__: http://code.djangoproject.com/ticket/12818
-
"""
updated = datetime.datetime(2010, 2, 20)
models.SchoolClass.objects.create(year=2009, last_updated=updated)
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index cb64dad97d..76becdd948 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -548,7 +548,6 @@ class BaseCacheTests(object):
keys that would be refused by memcached. This encourages portable
caching code without making it too difficult to use production backends
with more liberal key rules. Refs #6447.
-
"""
# mimic custom ``make_key`` method being defined since the default will
# never show the below warnings
@@ -1124,7 +1123,6 @@ class MemcachedCacheTests(BaseCacheTests, TestCase):
In order to be memcached-API-library agnostic, we only assert
that a generic exception of some kind is raised.
-
"""
# memcached does not allow whitespace or control characters in keys
self.assertRaises(Exception, cache.set, 'key with spaces', 'value')
@@ -1234,7 +1232,6 @@ class CustomCacheKeyValidationTests(SimpleTestCase):
Tests for the ability to mixin a custom ``validate_key`` method to
a custom cache backend that otherwise inherits from a builtin
backend, and override the default key validation. Refs #6447.
-
"""
def test_custom_key_validation(self):
# this key is both longer than 250 characters, and has spaces
diff --git a/tests/delete_regress/tests.py b/tests/delete_regress/tests.py
index d03ce3771f..7cbd94f427 100644
--- a/tests/delete_regress/tests.py
+++ b/tests/delete_regress/tests.py
@@ -63,7 +63,6 @@ class DeleteCascadeTests(TestCase):
"""
Django cascades deletes through generic-related objects to their
reverse relations.
-
"""
person = Person.objects.create(name='Nelson Mandela')
award = Award.objects.create(name='Nobel', content_object=person)
@@ -81,7 +80,6 @@ class DeleteCascadeTests(TestCase):
some other model has an FK to that through model, deletion is cascaded
from one of the participants in the M2M, to the through model, to its
related model.
-
"""
juan = Child.objects.create(name='Juan')
paints = Toy.objects.create(name='Paints')
@@ -126,7 +124,6 @@ class DeleteCascadeTransactionTests(TransactionTestCase):
def test_to_field(self):
"""
Cascade deletion works with ForeignKey.to_field set to non-PK.
-
"""
apple = Food.objects.create(name="apple")
Eaten.objects.create(food=apple, meal="lunch")
@@ -156,7 +153,6 @@ class ProxyDeleteTest(TestCase):
Tests on_delete behavior for proxy models.
See #16128.
-
"""
def create_image(self):
"""Return an Image referenced by both a FooImage and a FooFile."""
@@ -177,7 +173,6 @@ class ProxyDeleteTest(TestCase):
"""
Deleting the *proxy* instance bubbles through to its non-proxy and
*all* referring objects are deleted.
-
"""
self.create_image()
@@ -195,7 +190,6 @@ class ProxyDeleteTest(TestCase):
"""
Deleting a proxy-of-proxy instance should bubble through to its proxy
and non-proxy parents, deleting *all* referring objects.
-
"""
test_image = self.create_image()
@@ -221,7 +215,6 @@ class ProxyDeleteTest(TestCase):
"""
Deleting an instance of a concrete model should also delete objects
referencing its proxy subclass.
-
"""
self.create_image()
@@ -244,7 +237,6 @@ class ProxyDeleteTest(TestCase):
IntegrityError on databases unable to defer integrity checks).
Refs #17918.
-
"""
# Create an Image (proxy of File) and FooFileProxy (proxy of FooFile,
# which has an FK to File)
diff --git a/tests/flatpages_tests/test_forms.py b/tests/flatpages_tests/test_forms.py
index 6e6721494b..0ea706010b 100644
--- a/tests/flatpages_tests/test_forms.py
+++ b/tests/flatpages_tests/test_forms.py
@@ -80,7 +80,6 @@ class FlatpageAdminFormTests(TestCase):
"""
Existing flatpages can be edited in the admin form without triggering
the url-uniqueness validation.
-
"""
existing = FlatPage.objects.create(
url="/myflatpage1/", title="Some page", content="The content")
diff --git a/tests/forms_tests/tests/test_regressions.py b/tests/forms_tests/tests/test_regressions.py
index 960fbc7e47..d2f86e1db9 100644
--- a/tests/forms_tests/tests/test_regressions.py
+++ b/tests/forms_tests/tests/test_regressions.py
@@ -134,7 +134,6 @@ class FormsRegressionsTestCase(TestCase):
"""
Re-cleaning an instance that was added via a ModelForm should not raise
a pk uniqueness error.
-
"""
class CheeseForm(ModelForm):
class Meta:
diff --git a/tests/forms_tests/tests/test_widgets.py b/tests/forms_tests/tests/test_widgets.py
index f680ff8dff..7c66c4c391 100644
--- a/tests/forms_tests/tests/test_widgets.py
+++ b/tests/forms_tests/tests/test_widgets.py
@@ -1295,7 +1295,6 @@ class FakeFieldFile(object):
"""
Quacks like a FieldFile (has a .url and unicode representation), but
doesn't require us to care about storages etc.
-
"""
url = 'something'
@@ -1308,7 +1307,6 @@ class ClearableFileInputTests(SimpleTestCase):
"""
A ClearableFileInput with is_required False and rendered with
an initial value that is a file renders a clear checkbox.
-
"""
widget = ClearableFileInput()
widget.is_required = False
@@ -1368,7 +1366,6 @@ class ClearableFileInputTests(SimpleTestCase):
"""
A ClearableFileInput with is_required=False does not render a clear
checkbox.
-
"""
widget = ClearableFileInput()
widget.is_required = True
@@ -1384,7 +1381,6 @@ class ClearableFileInputTests(SimpleTestCase):
"""
A ClearableFileInput instantiated with no initial value does not render
a clear checkbox.
-
"""
widget = ClearableFileInput()
widget.is_required = False
@@ -1395,7 +1391,6 @@ class ClearableFileInputTests(SimpleTestCase):
"""
ClearableFileInput.value_from_datadict returns False if the clear
checkbox is checked, if not required.
-
"""
widget = ClearableFileInput()
widget.is_required = False
@@ -1408,7 +1403,6 @@ class ClearableFileInputTests(SimpleTestCase):
"""
ClearableFileInput.value_from_datadict never returns False if the field
is required.
-
"""
widget = ClearableFileInput()
widget.is_required = True
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py
index bc183ba431..16d8b2fe2c 100644
--- a/tests/model_fields/tests.py
+++ b/tests/model_fields/tests.py
@@ -52,7 +52,6 @@ class BasicFieldTests(test.TestCase):
"""
Regression test for #13071: NullBooleanField should not throw
a validation error when given a value of None.
-
"""
nullboolean = NullBooleanModel(nbfield=None)
try:
@@ -691,7 +690,6 @@ class TypeCoercionTests(test.TestCase):
Test that database lookups can accept the wrong types and convert
them with no error: especially on Postgres 8.3+ which does not do
automatic casting at the DB level. See #10015.
-
"""
def test_lookup_integer_in_charfield(self):
self.assertEqual(Post.objects.filter(title=9).count(), 0)
@@ -705,7 +703,6 @@ class FileFieldTests(unittest.TestCase):
"""
Test that FileField.save_form_data will clear its instance attribute
value if passed False.
-
"""
d = Document(myfile='something.txt')
self.assertEqual(d.myfile, 'something.txt')
@@ -717,7 +714,6 @@ class FileFieldTests(unittest.TestCase):
"""
Test that FileField.save_form_data considers None to mean "no change"
rather than "clear".
-
"""
d = Document(myfile='something.txt')
self.assertEqual(d.myfile, 'something.txt')
@@ -729,7 +725,6 @@ class FileFieldTests(unittest.TestCase):
"""
Test that FileField.save_form_data, if passed a truthy value, updates
its instance attribute.
-
"""
d = Document(myfile='something.txt')
self.assertEqual(d.myfile, 'something.txt')
diff --git a/tests/model_formsets_regress/tests.py b/tests/model_formsets_regress/tests.py
index d9e87ec046..bc42fd489c 100644
--- a/tests/model_formsets_regress/tests.py
+++ b/tests/model_formsets_regress/tests.py
@@ -214,7 +214,6 @@ class InlineFormsetTests(TestCase):
Existing and new inlines are saved with save_as_new.
Regression for #14938.
-
"""
efnet = Network.objects.create(name="EFNet")
host1 = Host.objects.create(hostname="irc.he.net", network=efnet)
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index c041669ae0..831990f099 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -2692,7 +2692,6 @@ class ExcludeTest17600(TestCase):
def test_exclude_plain(self):
"""
This should exclude Orders which have some items with status 1
-
"""
self.assertQuerysetEqual(
Order.objects.exclude(items__status=1),
@@ -2701,7 +2700,6 @@ class ExcludeTest17600(TestCase):
def test_exclude_plain_distinct(self):
"""
This should exclude Orders which have some items with status 1
-
"""
self.assertQuerysetEqual(
Order.objects.exclude(items__status=1).distinct(),
@@ -2710,7 +2708,6 @@ class ExcludeTest17600(TestCase):
def test_exclude_with_q_object_distinct(self):
"""
This should exclude Orders which have some items with status 1
-
"""
self.assertQuerysetEqual(
Order.objects.exclude(Q(items__status=1)).distinct(),
@@ -2719,7 +2716,6 @@ class ExcludeTest17600(TestCase):
def test_exclude_with_q_object_no_distinct(self):
"""
This should exclude Orders which have some items with status 1
-
"""
self.assertQuerysetEqual(
Order.objects.exclude(Q(items__status=1)),
@@ -2729,7 +2725,6 @@ class ExcludeTest17600(TestCase):
"""
Using exclude(condition) and exclude(Q(condition)) should
yield the same QuerySet
-
"""
self.assertEqual(
list(Order.objects.exclude(items__status=1).distinct()),
@@ -2739,7 +2734,6 @@ class ExcludeTest17600(TestCase):
"""
Using exclude(condition) and exclude(Q(condition)) should
yield the same QuerySet
-
"""
self.assertEqual(
list(Order.objects.exclude(items__status=1)),
diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py
index 6a83c88368..23837d17c0 100644
--- a/tests/serializers_regress/tests.py
+++ b/tests/serializers_regress/tests.py
@@ -592,7 +592,6 @@ class XmlDeserializerSecurityTests(SimpleTestCase):
This is the most straightforward way to prevent all entity definitions
and avoid both external entities and entity-expansion attacks.
-
"""
xml = '<?xml version="1.0" standalone="no"?><!DOCTYPE example SYSTEM "http://example.com/example.dtd">'
with self.assertRaises(DTDForbidden):
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index ed5ae785ec..32b297b427 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -101,7 +101,6 @@ class ClassDecoratedTestCaseSuper(TestCase):
"""
Dummy class for testing max recursion error in child class call to
super(). Refs #17011.
-
"""
def test_max_recursion_error(self):
pass
@@ -130,7 +129,6 @@ class ClassDecoratedTestCase(ClassDecoratedTestCaseSuper):
"""
Overriding a method on a super class and then calling that method on
the super class should not trigger infinite recursion. See #17011.
-
"""
try:
super(ClassDecoratedTestCase, self).test_max_recursion_error()
diff --git a/tests/wsgi/tests.py b/tests/wsgi/tests.py
index 13760d0b61..ea7112a03d 100644
--- a/tests/wsgi/tests.py
+++ b/tests/wsgi/tests.py
@@ -25,7 +25,6 @@ class WSGITest(TestCase):
"""
Verify that ``get_wsgi_application`` returns a functioning WSGI
callable.
-
"""
application = get_wsgi_application()
@@ -80,7 +79,6 @@ class GetInternalWSGIApplicationTest(unittest.TestCase):
"""
If ``WSGI_APPLICATION`` is a dotted path, the referenced object is
returned.
-
"""
app = get_internal_wsgi_application()
@@ -93,7 +91,6 @@ class GetInternalWSGIApplicationTest(unittest.TestCase):
"""
If ``WSGI_APPLICATION`` is ``None``, the return value of
``get_wsgi_application`` is returned.
-
"""
# Mock out get_wsgi_application so we know its return value is used
fake_app = object()