Skip to content

Commit 23324f0

Browse files
committed
minor fix in ImageField docstring
1 parent 26e2fc8 commit 23324f0

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

mongoengine/fields.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,12 +1867,9 @@ class ImageField(FileField):
18671867
"""
18681868
A Image File storage field.
18691869
1870-
@size (width, height, force):
1871-
max size to store images, if larger will be automatically resized
1872-
ex: size=(800, 600, True)
1873-
1874-
@thumbnail (width, height, force):
1875-
size to generate a thumbnail
1870+
:param size: max size to store images, provided as (width, height, force)
1871+
if larger, it will be automatically resized (ex: size=(800, 600, True))
1872+
:param thumbnail_size: size to generate a thumbnail, provided as (width, height, force)
18761873
18771874
.. versionadded:: 0.6
18781875
"""

tests/fields/fields.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,8 @@ class Person(Document):
618618
self.assertRaises(ValidationError, person.validate)
619619
person.admin = 'Yes'
620620
self.assertRaises(ValidationError, person.validate)
621+
person.admin = 'False'
622+
self.assertRaises(ValidationError, person.validate)
621623

622624
def test_uuid_field_string(self):
623625
"""Test UUID fields storing as String
@@ -2905,7 +2907,6 @@ class Attachment(Document):
29052907
for invalid_data in (2, u'Im_a_unicode', ['some_str']):
29062908
self.assertRaises(ValidationError, Attachment(blob=invalid_data).validate)
29072909

2908-
29092910
def test_binary_field_primary(self):
29102911
class Attachment(Document):
29112912
id = BinaryField(primary_key=True)

0 commit comments

Comments
 (0)