def test_max_height(self): from zope.schema import Float as FIELD from collective.cropimage.id import IID field = IID.get('max_height') self.assertTrue(isinstance(field, FIELD)) self.assertEqual(field.title, u'Maximum Height') self.assertEqual( field.description, u'Keep this field 0.0 if you do not need to set maximum height.') self.assertEqual(field.default, 0.0)
def test_min_width(self): from zope.schema import Float as FIELD from collective.cropimage.id import IID field = IID.get('min_width') self.assertTrue(isinstance(field, FIELD)) self.assertEqual(field.title, u'Minimum Width') self.assertEqual( field.description, u'Keep this field 0.0 if you do not need to set minimum width.') self.assertEqual(field.default, 0.0)
def test_max_height(self): from zope.schema import Float as FIELD from collective.cropimage.id import IID field = IID.get('max_height') self.assertTrue(isinstance(field, FIELD)) self.assertEqual(field.title, u'Maximum Height') self.assertEqual( field.description, u'Keep this field 0.0 if you do not need to set maximum height.' ) self.assertEqual(field.default, 0.0)
def test_min_width(self): from zope.schema import Float as FIELD from collective.cropimage.id import IID field = IID.get('min_width') self.assertTrue(isinstance(field, FIELD)) self.assertEqual(field.title, u'Minimum Width') self.assertEqual( field.description, u'Keep this field 0.0 if you do not need to set minimum width.' ) self.assertEqual(field.default, 0.0)
def test_instance(self): item = self.createInstance() from collective.cropimage.id import ID self.assertTrue(isinstance(item, ID)) from collective.cropimage.id import IID self.assertTrue(IID.providedBy(item))
def test_id(self): from zope.schema import TextLine as FIELD from collective.cropimage.id import IID field = IID.get('id') self.assertTrue(isinstance(field, FIELD)) self.assertEqual(field.title, u'ID')