示例#1
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)
示例#2
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)
示例#3
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)
示例#4
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)
示例#5
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))
示例#6
0
 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')
示例#7
0
 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')
示例#8
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))