summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-30 12:11:05 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-30 12:11:05 -0700
commit778ce245dd466bce1b19f89e52cf9ed8f1b46513 (patch)
tree2de2ad5574c99a5918eb35d9bbb6d7c4fdd86ed7 /tests
parent92dbf342868e68dfe60569c60dd5aa5925194221 (diff)
Corrected many style guide violations that the newest version of flake8 catches
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_views/tests.py2
-rw-r--r--tests/forms_tests/tests/test_fields.py2
-rw-r--r--tests/lookup/tests.py2
-rw-r--r--tests/m2m_regress/tests.py2
-rw-r--r--tests/mail/tests.py2
-rw-r--r--tests/save_delete_hooks/models.py2
-rw-r--r--tests/str/tests.py2
-rw-r--r--tests/template_tests/test_response.py3
8 files changed, 9 insertions, 8 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 39a79c0614..7d3956cc63 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1380,7 +1380,7 @@ class AdminViewPermissionsTest(TestCase):
self.client.get('/test_admin/admin/')
self.client.post(login_url, self.deleteuser_login)
response = self.client.get('/test_admin/admin/admin_views/section/1/delete/')
- # test response contains link to related Article
+ # test response contains link to related Article
self.assertContains(response, "admin_views/article/1/")
response = self.client.get('/test_admin/admin/admin_views/article/1/delete/')
diff --git a/tests/forms_tests/tests/test_fields.py b/tests/forms_tests/tests/test_fields.py
index b06b34f26c..e6bb39a42a 100644
--- a/tests/forms_tests/tests/test_fields.py
+++ b/tests/forms_tests/tests/test_fields.py
@@ -1158,7 +1158,7 @@ class FieldsTests(SimpleTestCase):
"'Select a valid choice. 3 is not one of the available choices.'",
f.clean, ['3'])
- # ComboField ##################################################################
+ # ComboField ##################################################################
def test_combofield_1(self):
f = ComboField(fields=[CharField(max_length=20), EmailField()])
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
index 8a9b69b879..04d9f0fc9e 100644
--- a/tests/lookup/tests.py
+++ b/tests/lookup/tests.py
@@ -436,7 +436,7 @@ class LookupTests(TestCase):
])
def test_none(self):
- # none() returns a QuerySet that behaves like any other QuerySet object
+ # none() returns a QuerySet that behaves like any other QuerySet object
self.assertQuerysetEqual(Article.objects.none(), [])
self.assertQuerysetEqual(
Article.objects.none().filter(headline__startswith='Article'), [])
diff --git a/tests/m2m_regress/tests.py b/tests/m2m_regress/tests.py
index 105e41b644..fd92a0b634 100644
--- a/tests/m2m_regress/tests.py
+++ b/tests/m2m_regress/tests.py
@@ -5,7 +5,7 @@ from django.test import TestCase
from django.utils import six
from .models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild,
- SelfReferChildSibling, Worksheet, RegressionModelSplit, Line)
+ SelfReferChildSibling, Worksheet, RegressionModelSplit)
class M2MRegressionTests(TestCase):
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index 5912d94efb..06292b3cb6 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -192,7 +192,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
SafeMIMEMultipart as well
"""
headers = {"Date": "Fri, 09 Nov 2001 01:08:47 -0000", "Message-ID": "foo"}
- subject, from_email, to = 'hello', 'from@example.com', '"Sürname, Firstname" <to@example.com>'
+ from_email, to = 'from@example.com', '"Sürname, Firstname" <to@example.com>'
text_content = 'This is an important message.'
html_content = '<p>This is an <strong>important</strong> message.</p>'
msg = EmailMultiAlternatives('Message from Firstname Sürname', text_content, from_email, [to], headers=headers)
diff --git a/tests/save_delete_hooks/models.py b/tests/save_delete_hooks/models.py
index a6e1abfb77..abba693778 100644
--- a/tests/save_delete_hooks/models.py
+++ b/tests/save_delete_hooks/models.py
@@ -24,7 +24,7 @@ class Person(models.Model):
def save(self, *args, **kwargs):
self.data.append("Before save")
- # Call the "real" save() method
+ # Call the "real" save() method
super(Person, self).save(*args, **kwargs)
self.data.append("After save")
diff --git a/tests/str/tests.py b/tests/str/tests.py
index aeb2874195..4139fa4354 100644
--- a/tests/str/tests.py
+++ b/tests/str/tests.py
@@ -1,4 +1,4 @@
- # -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index 17d8f11ba5..48a7b89029 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -259,7 +259,8 @@ class TemplateResponseTest(TestCase):
'first/test.html', {
'value': 123,
'fn': datetime.now,
- })
+ }
+ )
self.assertRaises(ContentNotRenderedError,
pickle.dumps, response)