Back to index

plone3  3.1.7
Classes | Functions | Variables
Archetypes.tests.test_fields Namespace Reference

Classes

class  sampleInterfaceVocabulary
class  Dummy
class  DummyVocabulary
class  FakeRequest
class  ProcessingTest
class  DownloadTest

Functions

def test_suite

Variables

list test_fields
list field_instances = []
tuple txt_file = open(os.path.join(PACKAGE_HOME, 'input', 'rest1.rst'))
tuple txt_content = txt_file.read()
tuple img_file = open(os.path.join(PACKAGE_HOME, 'input', 'tool.gif'), 'rb')
tuple img_content = img_file.read()
dictionary field_values
dictionary expected_values
dictionary empty_values
tuple schema = Schema(tuple(field_instances))
tuple sampleDisplayList = DisplayList([('e1', 'e1'), ('element2', 'element2')])
tuple DummyVocabFactory = DummyVocabulary()

Function Documentation

Definition at line 371 of file test_fields.py.

00371 
00372 def test_suite():
00373     from unittest import TestSuite, makeSuite
00374     suite = TestSuite()
00375     suite.addTest(makeSuite(ProcessingTest))
00376     suite.addTest(makeSuite(DownloadTest))
00377     return suite

Variable Documentation

Definition at line 149 of file test_fields.py.

Initial value:
00001 {'objectfield':None,
00002                    'stringfield':'',
00003                    'filefield':None,
00004                    'textfield':'',
00005                    'datetimefield':'2007-00-00',
00006                    'linesfield':(),
00007                    'integerfield': None,
00008                    'floatfield': None,
00009                    'fixedpointfield1': None,
00010                    'fixedpointfield2': None,
00011                    'booleanfield': None,
00012                }

Definition at line 111 of file test_fields.py.

Initial value:
00001 {'objectfield':'objectfield',
00002                    'stringfield':'stringfield',
00003                    'filefield':txt_content,
00004                    'textfield':'textfield',
00005                    'datetimefield':DateTime('2003-01-01 03:04'),
00006                    'linesfield':('bla', 'bla'),
00007                    'integerfield': 1,
00008                    'floatfield': 1.5,
00009                    'fixedpointfield1':  '1.50',
00010                    'fixedpointfield2': '1.50',
00011                    'booleanfield': 1,
00012                    'imagefield':'<img src="%s/dummy/imagefield" alt="Spam" title="Spam" height="16" width="16" />' % portal_name, 
00013                    'photofield':'<img src="%s/dummy/photofield/variant/original" alt="" title="" height="16" width="16" border="0" />' % portal_name
00014                    }

Definition at line 96 of file test_fields.py.

Definition at line 68 of file test_fields.py.

Initial value:
00001 {'objectfield':'objectfield',
00002                 'stringfield':'stringfield',
00003                 'filefield_file':txt_file,
00004                 'textfield':'textfield',
00005                 'datetimefield':'',
00006                 'datetimefield_year':'2003',
00007                 'datetimefield_month':'01',
00008                 'datetimefield_day':'01',
00009                 'datetimefield_hour':'03',
00010                 'datetimefield_minute':'04',
00011                 'linesfield':'bla\nbla',
00012                 'integerfield':'1',
00013                 'floatfield':'1.5',
00014                 'fixedpointfield1': '1.5',
00015                 'fixedpointfield2': '1,5',
00016                 'booleanfield':'1',
00017                 'imagefield_file':img_file,
00018                 'photofield_file':img_file}

Definition at line 77 of file test_fields.py.

Definition at line 75 of file test_fields.py.

tuple Archetypes.tests.test_fields.img_file = open(os.path.join(PACKAGE_HOME, 'input', 'tool.gif'), 'rb')

Definition at line 74 of file test_fields.py.

tuple Archetypes.tests.test_fields.sampleDisplayList = DisplayList([('e1', 'e1'), ('element2', 'element2')])

Definition at line 125 of file test_fields.py.

Definition at line 124 of file test_fields.py.

Initial value:
00001 [
00002           ('ObjectField', 'objectfield'),
00003           ('StringField', 'stringfield'),
00004           ('FileField', 'filefield'),
00005           ('TextField', 'textfield'),
00006           ('DateTimeField', 'datetimefield'),
00007           ('LinesField','linesfield'),
00008           ('IntegerField', 'integerfield'),
00009           ('FloatField', 'floatfield'),
00010           ('FixedPointField', 'fixedpointfield1'),
00011           ('FixedPointField', 'fixedpointfield2'),
00012           ('BooleanField', 'booleanfield'),
00013           ('ImageField', 'imagefield'),
00014           ('PhotoField', 'photofield'),
00015           # 'ReferenceField', 'ComputedField', 'CMFObjectField',
00016           ]

Definition at line 51 of file test_fields.py.

Definition at line 73 of file test_fields.py.

tuple Archetypes.tests.test_fields.txt_file = open(os.path.join(PACKAGE_HOME, 'input', 'rest1.rst'))

Definition at line 72 of file test_fields.py.