Permalink
Browse files

Fixed spelling mistakes in code and comments.

  • Loading branch information...
h4ck3rm1k3 authored and timgraham committed Jan 19, 2017
1 parent cecc079 commit 7d200949968002d2c2b4390953e8bda7153a49c9
@@ -116,8 +116,8 @@ def __enter__(self):
return self
def __exit__(self, type, value, traceback):
- # Ticket #17671 - Close instead of passing thru to avoid backend
- # specific behavior.
+ # Close instead of passing through to avoid backend-specific behavior
+ # (#17671).
self.close()
@@ -34,9 +34,9 @@ def __enter__(self):
return self
def __exit__(self, type, value, traceback):
- # Ticket #17671 - Close instead of passing thru to avoid backend
- # specific behavior. Catch errors liberally because errors in cleanup
- # code aren't useful.
+ # Close instead of passing through to avoid backend-specific behavior
+ # (#17671). Catch errors liberally because errors in cleanup code
+ # aren't useful.
try:
self.close()
except self.db.Database.Error:
@@ -55,7 +55,7 @@ class ColumnTypes(models.Model):
file_path_field = models.FilePathField()
float_field = models.FloatField()
int_field = models.IntegerField()
- gen_ip_adress_field = models.GenericIPAddressField(protocol="ipv4")
+ gen_ip_address_field = models.GenericIPAddressField(protocol="ipv4")
pos_int_field = models.PositiveIntegerField()
pos_small_int_field = models.PositiveSmallIntegerField()
slug_field = models.SlugField()
View
@@ -66,9 +66,9 @@ def test_field_types(self):
assertFieldType('date_field', "models.DateField()")
assertFieldType('date_time_field', "models.DateTimeField()")
if connection.features.can_introspect_ip_address_field:
- assertFieldType('gen_ip_adress_field', "models.GenericIPAddressField()")
+ assertFieldType('gen_ip_address_field', "models.GenericIPAddressField()")
elif not connection.features.interprets_empty_strings_as_nulls:
- assertFieldType('gen_ip_adress_field', "models.CharField(max_length=39)")
+ assertFieldType('gen_ip_address_field', "models.CharField(max_length=39)")
if connection.features.can_introspect_time_field:
assertFieldType('time_field', "models.TimeField()")
if connection.features.has_native_uuid_field:
@@ -74,22 +74,22 @@ class Meta:
@isolate_apps('model_fields', 'model_fields.tests')
def test_abstract_model_app_relative_foreign_key(self):
class AbstractReferent(models.Model):
- reference = models.ForeignKey('Refered', on_delete=models.CASCADE)
+ reference = models.ForeignKey('Referred', on_delete=models.CASCADE)
class Meta:
app_label = 'model_fields'
abstract = True
def assert_app_model_resolved(label):
- class Refered(models.Model):
+ class Referred(models.Model):
class Meta:
app_label = label
class ConcreteReferent(AbstractReferent):
class Meta:
app_label = label
- self.assertEqual(ConcreteReferent._meta.get_field('reference').related_model, Refered)
+ self.assertEqual(ConcreteReferent._meta.get_field('reference').related_model, Referred)
assert_app_model_resolved('model_fields')
assert_app_model_resolved('tests')
@@ -39,19 +39,19 @@ class Meta:
@isolate_apps('model_fields', 'model_fields.tests')
def test_abstract_model_app_relative_foreign_key(self):
class AbstractReferent(models.Model):
- reference = models.ManyToManyField('Refered', through='Through')
+ reference = models.ManyToManyField('Referred', through='Through')
class Meta:
app_label = 'model_fields'
abstract = True
def assert_app_model_resolved(label):
- class Refered(models.Model):
+ class Referred(models.Model):
class Meta:
app_label = label
class Through(models.Model):
- refered = models.ForeignKey('Refered', on_delete=models.CASCADE)
+ referred = models.ForeignKey('Referred', on_delete=models.CASCADE)
referent = models.ForeignKey('ConcreteReferent', on_delete=models.CASCADE)
class Meta:
@@ -61,7 +61,7 @@ class ConcreteReferent(AbstractReferent):
class Meta:
app_label = label
- self.assertEqual(ConcreteReferent._meta.get_field('reference').related_model, Refered)
+ self.assertEqual(ConcreteReferent._meta.get_field('reference').related_model, Referred)
self.assertEqual(ConcreteReferent.reference.through, Through)
assert_app_model_resolved('model_fields')
@@ -391,7 +391,7 @@ def test_non_regex(self):
A Resolver404 is raised if resolving doesn't meet the basic
requirements of a path to match - i.e., at the very least, it matches
the root pattern '^/'. Never return None from resolve() to prevent a
- TypeError from occuring later (#10834).
+ TypeError from occurring later (#10834).
"""
with self.assertRaises(Resolver404):
resolve('')

0 comments on commit 7d20094

Please sign in to comment.