Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed E221 pep8 warnings.

  • Loading branch information...
commit 1597503a017a9ced422a81d314cb4097d53c3dfd 1 parent 0d0f4f0
@timgraham timgraham authored
Showing with 94 additions and 90 deletions.
  1. +2 −2 django/contrib/admin/templatetags/admin_list.py
  2. +7 −1 django/contrib/admindocs/views.py
  3. +0 −1  django/contrib/auth/tests/test_hashers.py
  4. +1 −1  django/contrib/gis/db/models/query.py
  5. +4 −4 django/contrib/gis/geoip/base.py
  6. +1 −1  django/contrib/gis/geos/libgeos.py
  7. +13 −13 django/contrib/gis/geos/mutable_list.py
  8. +4 −4 django/contrib/gis/geos/polygon.py
  9. +4 −4 django/contrib/gis/geos/prototypes/io.py
  10. +2 −2 django/contrib/gis/maps/google/gmap.py
  11. +2 −2 django/contrib/gis/maps/google/zoom.py
  12. +2 −2 django/contrib/gis/measure.py
  13. +1 −1  django/contrib/gis/tests/geoapp/tests.py
  14. +2 −2 django/contrib/gis/tests/layermap/tests.py
  15. +2 −2 django/contrib/gis/tests/utils.py
  16. +2 −2 django/contrib/messages/tests/base.py
  17. +1 −1  django/core/management/templates.py
  18. +2 −2 django/template/defaultfilters.py
  19. +11 −11 django/utils/datastructures.py
  20. +6 −6 django/utils/synch.py
  21. +8 −8 docs/_ext/djangodocs.py
  22. +1 −1  setup.cfg
  23. +2 −3 tests/admin_util/tests.py
  24. +4 −4 tests/i18n/tests.py
  25. +1 −1  tests/m2m_through_regress/tests.py
  26. +1 −1  tests/model_formsets/tests.py
  27. +1 −1  tests/multiple_database/tests.py
  28. +2 −2 tests/prefetch_related/models.py
  29. +4 −4 tests/queries/tests.py
  30. +1 −1  tests/validation/models.py
View
4 django/contrib/admin/templatetags/admin_list.py
@@ -134,8 +134,8 @@ def result_headers(cl):
# build new ordering param
o_list_primary = [] # URL for making this field the primary sort
- o_list_remove = [] # URL for removing this field from sort
- o_list_toggle = [] # URL for toggling order type for this field
+ o_list_remove = [] # URL for removing this field from sort
+ o_list_toggle = [] # URL for toggling order type for this field
make_qs_param = lambda t, n: ('-' if t == 'desc' else '') + str(n)
for j, ot in ordering_field_columns.items():
View
8 django/contrib/admindocs/views.py
@@ -204,7 +204,13 @@ def model_detail(request, app_label, model_name):
if isinstance(field, models.ForeignKey):
data_type = field.rel.to.__name__
app_label = field.rel.to._meta.app_label
- verbose = utils.parse_rst((_("the related `%(app_label)s.%(data_type)s` object") % {'app_label': app_label, 'data_type': data_type}), 'model', _('model:') + data_type)
+ verbose = utils.parse_rst(
+ (_("the related `%(app_label)s.%(data_type)s` object") % {
+ 'app_label': app_label, 'data_type': data_type,
+ }),
+ 'model',
+ _('model:') + data_type,
+ )
else:
data_type = get_readable_field_data_type(field)
verbose = field.verbose_name
View
1  django/contrib/auth/tests/test_hashers.py
@@ -275,7 +275,6 @@ def setter(password):
finally:
hasher.iterations = old_iterations
-
def test_load_library_no_algorithm(self):
with self.assertRaises(ValueError) as e:
BasePasswordHasher()._load_library()
View
2  django/contrib/gis/db/models/query.py
@@ -678,7 +678,7 @@ def _distance_attribute(self, func, geom=None, tolerance=0.05, spheroid=False, *
procedure_fmt += ', %s(%%%%s, %s)' % (backend.transform, self.query.transformed_srid)
else:
# `transform()` was not used on this GeoQuerySet.
- procedure_fmt = '%(geo_col)s,%(geom)s'
+ procedure_fmt = '%(geo_col)s,%(geom)s'
if not geography and geodetic:
# Spherical distance calculation is needed (because the geographic
View
8 django/contrib/gis/geoip/base.py
@@ -41,11 +41,11 @@ class GeoIP(object):
#
# GEOIP_MMAP_CACHE - load database into mmap shared memory ( not available
# on Windows).
- GEOIP_STANDARD = 0
+ GEOIP_STANDARD = 0
GEOIP_MEMORY_CACHE = 1
- GEOIP_CHECK_CACHE = 2
- GEOIP_INDEX_CACHE = 4
- GEOIP_MMAP_CACHE = 8
+ GEOIP_CHECK_CACHE = 2
+ GEOIP_INDEX_CACHE = 4
+ GEOIP_MMAP_CACHE = 8
cache_options = dict((opt, None) for opt in (0, 1, 2, 4, 8))
# Paths to the city & country binary databases.
View
2  django/contrib/gis/geos/libgeos.py
@@ -100,7 +100,7 @@ class GEOSContextHandle_t(Structure):
GEOM_PTR = POINTER(GEOSGeom_t)
PREPGEOM_PTR = POINTER(GEOSPrepGeom_t)
CS_PTR = POINTER(GEOSCoordSeq_t)
-CONTEXT_PTR = POINTER(GEOSContextHandle_t)
+CONTEXT_PTR = POINTER(GEOSContextHandle_t)
# Used specifically by the GEOSGeom_createPolygon and GEOSGeom_createCollection
# GEOS routines
View
26 django/contrib/gis/geos/mutable_list.py
@@ -88,17 +88,17 @@ def __delitem__(self, index):
raise TypeError("%s is not a legal index" % index)
# calculate new length and dimensions
- origLen = len(self)
+ origLen = len(self)
if isinstance(index, six.integer_types):
index = self._checkindex(index)
- indexRange = [index]
+ indexRange = [index]
else:
- indexRange = range(*index.indices(origLen))
+ indexRange = range(*index.indices(origLen))
- newLen = origLen - len(indexRange)
- newItems = (self._get_single_internal(i)
- for i in xrange(origLen)
- if i not in indexRange)
+ newLen = origLen - len(indexRange)
+ newItems = (self._get_single_internal(i)
+ for i in xrange(origLen)
+ if i not in indexRange)
self._rebuild(newLen, newItems)
@@ -268,8 +268,8 @@ def _set_slice(self, index, values):
self._check_allowed(values)
- origLen = len(self)
- valueList = list(values)
+ origLen = len(self)
+ valueList = list(values)
start, stop, step = index.indices(origLen)
# CAREFUL: index.step and step are not the same!
@@ -281,7 +281,7 @@ def _set_slice(self, index, values):
def _assign_extended_slice_rebuild(self, start, stop, step, valueList):
'Assign an extended slice by rebuilding entire list'
- indexList = range(start, stop, step)
+ indexList = range(start, stop, step)
# extended slice, only allow assigning slice of same size
if len(valueList) != len(indexList):
raise ValueError('attempt to assign sequence of size %d '
@@ -289,7 +289,7 @@ def _assign_extended_slice_rebuild(self, start, stop, step, valueList):
% (len(valueList), len(indexList)))
# we're not changing the length of the sequence
- newLen = len(self)
+ newLen = len(self)
newVals = dict(zip(indexList, valueList))
def newItems():
for i in xrange(newLen):
@@ -302,7 +302,7 @@ def newItems():
def _assign_extended_slice(self, start, stop, step, valueList):
'Assign an extended slice by re-assigning individual items'
- indexList = range(start, stop, step)
+ indexList = range(start, stop, step)
# extended slice, only allow assigning slice of same size
if len(valueList) != len(indexList):
raise ValueError('attempt to assign sequence of size %d '
@@ -316,7 +316,7 @@ def _assign_simple_slice(self, start, stop, valueList):
'Assign a simple slice; Can assign slice of any length'
origLen = len(self)
stop = max(start, stop)
- newLen = origLen - stop + start + len(valueList)
+ newLen = origLen - stop + start + len(valueList)
def newItems():
for i in xrange(origLen + 1):
if i == start:
View
8 django/contrib/gis/geos/polygon.py
@@ -37,11 +37,11 @@ def __init__(self, *args, **kwargs):
# If initialized as Polygon(shell, (LinearRing, LinearRing)) [for backward-compatibility]
if n_holes == 1 and isinstance(init_holes[0], (tuple, list)):
if len(init_holes[0]) == 0:
- init_holes = ()
- n_holes = 0
+ init_holes = ()
+ n_holes = 0
elif isinstance(init_holes[0][0], LinearRing):
- init_holes = init_holes[0]
- n_holes = len(init_holes)
+ init_holes = init_holes[0]
+ n_holes = len(init_holes)
polygon = self._create_polygon(n_holes + 1, (ext_ring,) + init_holes)
super(Polygon, self).__init__(polygon, **kwargs)
View
8 django/contrib/gis/geos/prototypes/io.py
@@ -23,9 +23,9 @@ class WKBReader_st(Structure):
class WKBWriter_st(Structure):
pass
-WKT_READ_PTR = POINTER(WKTReader_st)
+WKT_READ_PTR = POINTER(WKTReader_st)
WKT_WRITE_PTR = POINTER(WKTWriter_st)
-WKB_READ_PTR = POINTER(WKBReader_st)
+WKB_READ_PTR = POINTER(WKBReader_st)
WKB_WRITE_PTR = POINTER(WKBReader_st)
### WKTReader routines ###
@@ -114,8 +114,8 @@ def wkb_writer_set(func, argtype=c_int):
wkb_writer_get_byteorder = wkb_writer_get(GEOSFunc('GEOSWKBWriter_getByteOrder'))
wkb_writer_set_byteorder = wkb_writer_set(GEOSFunc('GEOSWKBWriter_setByteOrder'))
-wkb_writer_get_outdim = wkb_writer_get(GEOSFunc('GEOSWKBWriter_getOutputDimension'))
-wkb_writer_set_outdim = wkb_writer_set(GEOSFunc('GEOSWKBWriter_setOutputDimension'))
+wkb_writer_get_outdim = wkb_writer_get(GEOSFunc('GEOSWKBWriter_getOutputDimension'))
+wkb_writer_set_outdim = wkb_writer_set(GEOSFunc('GEOSWKBWriter_setOutputDimension'))
wkb_writer_get_include_srid = wkb_writer_get(GEOSFunc('GEOSWKBWriter_getIncludeSRID'), restype=c_char)
wkb_writer_set_include_srid = wkb_writer_set(GEOSFunc('GEOSWKBWriter_setIncludeSRID'), argtype=c_char)
View
4 django/contrib/gis/maps/google/gmap.py
@@ -20,8 +20,8 @@ class GoogleMap(object):
# String constants
onunload = mark_safe('onunload="GUnload()"') # Cleans up after Google Maps
- vml_css = mark_safe('v\:* {behavior:url(#default#VML);}') # CSS for IE VML
- xmlns = mark_safe('xmlns:v="urn:schemas-microsoft-com:vml"') # XML Namespace (for IE VML).
+ vml_css = mark_safe('v\:* {behavior:url(#default#VML);}') # CSS for IE VML
+ xmlns = mark_safe('xmlns:v="urn:schemas-microsoft-com:vml"') # XML Namespace (for IE VML).
def __init__(self, key=None, api_url=None, version=None,
center=None, zoom=None, dom_id='map',
View
4 django/contrib/gis/maps/google/zoom.py
@@ -34,7 +34,7 @@ def __init__(self, num_zoom=19, tilesize=256):
# zoom levels.
self._degpp = [] # Degrees per pixel
self._radpp = [] # Radians per pixel
- self._npix = [] # 1/2 the number of pixels for a tile at the given zoom level
+ self._npix = [] # 1/2 the number of pixels for a tile at the given zoom level
# Incrementing through the zoom levels and populating the parameter arrays.
z = tilesize # The number of pixels per zoom level.
@@ -158,5 +158,5 @@ def get_width_height(self, extent):
ur = Point(extent[2:])
# Calculating the width and height.
height = ll.distance(ul)
- width = ul.distance(ur)
+ width = ul.distance(ur)
return width, height
View
4 django/contrib/gis/measure.py
@@ -51,8 +51,8 @@ def pretty_name(obj):
@total_ordering
class MeasureBase(object):
STANDARD_UNIT = None
- ALIAS = {}
- UNITS = {}
+ ALIAS = {}
+ UNITS = {}
LALIAS = {}
def __init__(self, default_unit=None, **kwargs):
View
2  django/contrib/gis/tests/geoapp/tests.py
@@ -118,7 +118,7 @@ def test_lookup_insert_transform(self):
# San Antonio in 'Texas 4205, Southern Zone (1983, meters)' (SRID 41157)
# Used the following Oracle SQL to get this value:
# SELECT SDO_UTIL.TO_WKTGEOMETRY(SDO_CS.TRANSFORM(SDO_GEOMETRY('POINT (-98.493183 29.424170)', 4326), 41157)) FROM DUAL;
- nad_wkt = 'POINT (300662.034646583 5416427.45974934)'
+ nad_wkt = 'POINT (300662.034646583 5416427.45974934)'
nad_srid = 41157
else:
# San Antonio in 'NAD83(HARN) / Texas Centric Lambert Conformal' (SRID 3084)
View
4 django/contrib/gis/tests/layermap/tests.py
@@ -31,8 +31,8 @@
invalid_shp = os.path.join(shp_path, 'invalid', 'emptypoints.shp')
# Dictionaries to hold what's expected in the county shapefile.
-NAMES = ['Bexar', 'Galveston', 'Harris', 'Honolulu', 'Pueblo']
-NUMS = [1, 2, 1, 19, 1] # Number of polygons for each.
+NAMES = ['Bexar', 'Galveston', 'Harris', 'Honolulu', 'Pueblo']
+NUMS = [1, 2, 1, 19, 1] # Number of polygons for each.
STATES = ['Texas', 'Texas', 'Texas', 'Hawaii', 'Colorado']
View
4 django/contrib/gis/tests/utils.py
@@ -30,9 +30,9 @@ def no_spatialite(func):
# Shortcut booleans to omit only portions of tests.
_default_db = settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1]
-oracle = _default_db == 'oracle'
+oracle = _default_db == 'oracle'
postgis = _default_db == 'postgis'
-mysql = _default_db == 'mysql'
+mysql = _default_db == 'mysql'
spatialite = _default_db == 'spatialite'
HAS_SPATIALREFSYS = True
View
4 django/contrib/messages/tests/base.py
@@ -57,9 +57,9 @@ class BaseTests(object):
def setUp(self):
self.settings_override = override_settings_tags(
- TEMPLATE_DIRS = (),
+ TEMPLATE_DIRS = (),
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS,
- MESSAGE_TAGS = '',
+ MESSAGE_TAGS = '',
MESSAGE_STORAGE = '%s.%s' % (self.storage_class.__module__,
self.storage_class.__name__),
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer',
View
2  django/core/management/templates.py
@@ -229,7 +229,7 @@ def cleanup_url(url):
tmp = url.rstrip('/')
filename = tmp.split('/')[-1]
if url.endswith('/'):
- display_url = tmp + '/'
+ display_url = tmp + '/'
else:
display_url = url
return filename, display_url
View
4 django/template/defaultfilters.py
@@ -194,10 +194,10 @@ def linenumbers(value, autoescape=None):
width = six.text_type(len(six.text_type(len(lines))))
if not autoescape or isinstance(value, SafeData):
for i, line in enumerate(lines):
- lines[i] = ("%0" + width + "d. %s") % (i + 1, line)
+ lines[i] = ("%0" + width + "d. %s") % (i + 1, line)
else:
for i, line in enumerate(lines):
- lines[i] = ("%0" + width + "d. %s") % (i + 1, escape(line))
+ lines[i] = ("%0" + width + "d. %s") % (i + 1, escape(line))
return mark_safe('\n'.join(lines))
@register.filter(is_safe=True)
View
22 django/utils/datastructures.py
@@ -490,19 +490,19 @@ def complain(self, *wargs, **kwargs):
raise AttributeError(self.warning)
# All list mutation functions complain.
- __delitem__ = complain
+ __delitem__ = complain
__delslice__ = complain
- __iadd__ = complain
- __imul__ = complain
- __setitem__ = complain
+ __iadd__ = complain
+ __imul__ = complain
+ __setitem__ = complain
__setslice__ = complain
- append = complain
- extend = complain
- insert = complain
- pop = complain
- remove = complain
- sort = complain
- reverse = complain
+ append = complain
+ extend = complain
+ insert = complain
+ pop = complain
+ remove= complain
+ sort = complain
+ reverse = complain
class DictWrapper(dict):
"""
View
12 django/utils/synch.py
@@ -27,11 +27,11 @@ class RWLock(object):
writer_leaves()
"""
def __init__(self):
- self.mutex = threading.RLock()
- self.can_read = threading.Semaphore(0)
+ self.mutex = threading.RLock()
+ self.can_read = threading.Semaphore(0)
self.can_write = threading.Semaphore(0)
- self.active_readers = 0
- self.active_writers = 0
+ self.active_readers = 0
+ self.active_writers = 0
self.waiting_readers = 0
self.waiting_writers = 0
@@ -48,7 +48,7 @@ def reader_leaves(self):
with self.mutex:
self.active_readers -= 1
if self.active_readers == 0 and self.waiting_writers != 0:
- self.active_writers += 1
+ self.active_writers += 1
self.waiting_writers -= 1
self.can_write.release()
@@ -73,7 +73,7 @@ def writer_leaves(self):
with self.mutex:
self.active_writers -= 1
if self.waiting_writers != 0:
- self.active_writers += 1
+ self.active_writers += 1
self.waiting_writers -= 1
self.can_write.release()
elif self.waiting_readers != 0:
View
16 docs/_ext/djangodocs.py
@@ -22,35 +22,35 @@
def setup(app):
app.add_crossref_type(
directivename = "setting",
- rolename = "setting",
+ rolename = "setting",
indextemplate = "pair: %s; setting",
)
app.add_crossref_type(
directivename = "templatetag",
- rolename = "ttag",
+ rolename = "ttag",
indextemplate = "pair: %s; template tag"
)
app.add_crossref_type(
directivename = "templatefilter",
- rolename = "tfilter",
+ rolename = "tfilter",
indextemplate = "pair: %s; template filter"
)
app.add_crossref_type(
directivename = "fieldlookup",
- rolename = "lookup",
+ rolename = "lookup",
indextemplate = "pair: %s; field lookup type",
)
app.add_description_unit(
directivename = "django-admin",
- rolename = "djadmin",
+ rolename = "djadmin",
indextemplate = "pair: %s; django-admin command",
- parse_node = parse_django_admin_node,
+ parse_node = parse_django_admin_node,
)
app.add_description_unit(
directivename = "django-admin-option",
- rolename = "djadminopt",
+ rolename = "djadminopt",
indextemplate = "pair: %s; django-admin command-line option",
- parse_node = parse_django_adminopt_node,
+ parse_node = parse_django_adminopt_node,
)
app.add_config_value('django_next_version', '0.0', True)
app.add_directive('versionadded', VersionDirective)
View
2  setup.cfg
@@ -4,7 +4,7 @@ install-script = scripts/rpm-install.sh
[flake8]
exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py
-ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E221,E231,E261,E301,F401,F403,W601
+ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E231,E261,E301,F401,F403,W601
[metadata]
license-file = LICENSE
View
5 tests/admin_util/tests.py
@@ -22,7 +22,6 @@
class NestedObjectsTests(TestCase):
"""
Tests for ``NestedObject`` utility collection.
-
"""
def setUp(self):
self.n = NestedObjects(using=DEFAULT_DB_ALIAS)
@@ -295,7 +294,7 @@ def test_safestring_in_field_label(self):
# safestring should not be escaped
class MyForm(forms.Form):
text = forms.CharField(label=mark_safe('<i>text</i>'))
- cb = forms.BooleanField(label=mark_safe('<i>cb</i>'))
+ cb = forms.BooleanField(label=mark_safe('<i>cb</i>'))
form = MyForm()
self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
@@ -306,7 +305,7 @@ class MyForm(forms.Form):
# normal strings needs to be escaped
class MyForm(forms.Form):
text = forms.CharField(label='&text')
- cb = forms.BooleanField(label='&cb')
+ cb = forms.BooleanField(label='&cb')
form = MyForm()
self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
View
8 tests/i18n/tests.py
@@ -1190,16 +1190,16 @@ def test_session_language(self):
# Clear the session data before request
session.save()
- response = self.client.get('/en/simple/')
+ self.client.get('/en/simple/')
self.assertEqual(self.client.session['_language'], 'en')
# Clear the session data before request
session.save()
- response = self.client.get('/fr/simple/')
+ self.client.get('/fr/simple/')
self.assertEqual(self.client.session['_language'], 'fr')
# Check that language is not changed in session
- response = self.client.get('/en/simple/')
+ self.client.get('/en/simple/')
self.assertEqual(self.client.session['_language'], 'fr')
@override_settings(
@@ -1221,7 +1221,7 @@ def test_backwards_session_language(self):
self.client.cookies[settings.SESSION_COOKIE_NAME] = session.session_key
# request other language; should default to old language key value
- response = self.client.get('/fr/simple/')
+ self.client.get('/fr/simple/')
self.assertEqual(self.client.session['_language'], 'en')
View
2  tests/m2m_through_regress/tests.py
@@ -98,7 +98,7 @@ def test_serialization(self):
def test_join_trimming(self):
"Check that we don't involve too many copies of the intermediate table when doing a join. Refs #8046, #8254"
- bob = Person.objects.create(name="Bob")
+ bob = Person.objects.create(name="Bob")
jim = Person.objects.create(name="Jim")
rock = Group.objects.create(name="Rock")
View
2  tests/model_formsets/tests.py
@@ -466,7 +466,7 @@ def test_inline_formsets(self):
formset = AuthorBooksFormSet(instance=author)
self.assertEqual(len(formset.forms), 3)
self.assertHTMLEqual(formset.forms[0].as_p(),
- '<p><label for="id_book_set-0-title">Title:</label> <input id="id_book_set-0-title" type="text" name="book_set-0-title" maxlength="100" /><input type="hidden" name="book_set-0-author" value="%d" id="id_book_set-0-author" /><input type="hidden" name="book_set-0-id" id="id_book_set-0-id" /></p>' % author.id)
+ '<p><label for="id_book_set-0-title">Title:</label> <input id="id_book_set-0-title" type="text" name="book_set-0-title" maxlength="100" /><input type="hidden" name="book_set-0-author" value="%d" id="id_book_set-0-author" /><input type="hidden" name="book_set-0-id" id="id_book_set-0-id" /></p>' % author.id)
self.assertHTMLEqual(formset.forms[1].as_p(),
'<p><label for="id_book_set-1-title">Title:</label> <input id="id_book_set-1-title" type="text" name="book_set-1-title" maxlength="100" /><input type="hidden" name="book_set-1-author" value="%d" id="id_book_set-1-author" /><input type="hidden" name="book_set-1-id" id="id_book_set-1-id" /></p>' % author.id)
self.assertHTMLEqual(formset.forms[2].as_p(),
View
2  tests/multiple_database/tests.py
@@ -1864,7 +1864,7 @@ def allow_migrate(self, db, model):
class MigrateTestCase(TestCase):
- available_apps = [
+ available_apps = [
'multiple_database',
'django.contrib.auth',
'django.contrib.contenttypes'
View
4 tests/prefetch_related/models.py
@@ -147,8 +147,8 @@ class Comment(models.Model):
comment = models.TextField()
# Content-object field
- content_type = models.ForeignKey(ContentType)
- object_pk = models.TextField()
+ content_type = models.ForeignKey(ContentType)
+ object_pk = models.TextField()
content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")
View
8 tests/queries/tests.py
@@ -1437,7 +1437,7 @@ def test_ticket15316_exclude_true(self):
self.assertQuerysetEqual(qs, [ci2.pk, ci3.pk], lambda x: x.pk, False)
def test_ticket15316_one2one_filter_false(self):
- c = SimpleCategory.objects.create(name="cat")
+ c = SimpleCategory.objects.create(name="cat")
c0 = SimpleCategory.objects.create(name="cat0")
c1 = SimpleCategory.objects.create(name="category1")
@@ -1453,7 +1453,7 @@ def test_ticket15316_one2one_filter_false(self):
self.assertQuerysetEqual(qs, [ci2.pk, ci3.pk], lambda x: x.pk, False)
def test_ticket15316_one2one_exclude_false(self):
- c = SimpleCategory.objects.create(name="cat")
+ c = SimpleCategory.objects.create(name="cat")
c0 = SimpleCategory.objects.create(name="cat0")
c1 = SimpleCategory.objects.create(name="category1")
@@ -1469,7 +1469,7 @@ def test_ticket15316_one2one_exclude_false(self):
self.assertQuerysetEqual(qs, [ci1.pk], lambda x: x.pk)
def test_ticket15316_one2one_filter_true(self):
- c = SimpleCategory.objects.create(name="cat")
+ c = SimpleCategory.objects.create(name="cat")
c0 = SimpleCategory.objects.create(name="cat0")
c1 = SimpleCategory.objects.create(name="category1")
@@ -1485,7 +1485,7 @@ def test_ticket15316_one2one_filter_true(self):
self.assertQuerysetEqual(qs, [ci1.pk], lambda x: x.pk)
def test_ticket15316_one2one_exclude_true(self):
- c = SimpleCategory.objects.create(name="cat")
+ c = SimpleCategory.objects.create(name="cat")
c0 = SimpleCategory.objects.create(name="cat0")
c1 = SimpleCategory.objects.create(name="category1")
View
2  tests/validation/models.py
@@ -50,7 +50,7 @@ class UniqueForDateModel(models.Model):
name = models.CharField(max_length=100)
class CustomMessagesModel(models.Model):
- other = models.IntegerField(blank=True, null=True)
+ other = models.IntegerField(blank=True, null=True)
number = models.IntegerField(db_column='number_val',
error_messages={'null': 'NULL', 'not42': 'AAARGH', 'not_equal': '%s != me'},
validators=[validate_answer_to_universe]
Please sign in to comment.
Something went wrong with that request. Please try again.