diff --git a/mongoengine/fields.py b/mongoengine/fields.py index dca4e84b..e9a5e4b2 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -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 """ diff --git a/tests/fields/fields.py b/tests/fields/fields.py index 7500bbad..ccf67031 100644 --- a/tests/fields/fields.py +++ b/tests/fields/fields.py @@ -618,6 +618,8 @@ class FieldTest(MongoDBTestCase): 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 @@ -2905,7 +2907,6 @@ class FieldTest(MongoDBTestCase): 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)