Skip to content

Commit

Permalink
minor fix in ImageField docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-bagerard committed Nov 4, 2018
1 parent 26e2fc8 commit 23324f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 3 additions & 6 deletions mongoengine/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,12 +1867,9 @@ class ImageField(FileField):
"""
A Image File storage field.
@size (width, height, force):
max size to store images, if larger will be automatically resized
ex: size=(800, 600, True)
@thumbnail (width, height, force):
size to generate a thumbnail
:param size: max size to store images, provided as (width, height, force)
if larger, it will be automatically resized (ex: size=(800, 600, True))
:param thumbnail_size: size to generate a thumbnail, provided as (width, height, force)
.. versionadded:: 0.6
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/fields/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ class Person(Document):
self.assertRaises(ValidationError, person.validate)
person.admin = 'Yes'
self.assertRaises(ValidationError, person.validate)
person.admin = 'False'
self.assertRaises(ValidationError, person.validate)

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


def test_binary_field_primary(self):
class Attachment(Document):
id = BinaryField(primary_key=True)
Expand Down

0 comments on commit 23324f0

Please sign in to comment.