Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(16)  |  Derive(1)  |  Import(9)

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_widgets.py   Products.Archetypes(Download)
from Products.Archetypes.tests.utils import PACKAGE_HOME
from Products.Archetypes.tests.utils import makeContent
from Products.Archetypes.tests.test_fields import FakeRequest
from DateTime import DateTime
 
    def test_appendtextarea_widget(self):
        request = FakeRequest()
        mystring = str('<<<<this is a test string>>>>')
 
        doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')
    def test_appendtextarea_timestamp_widget(self):
        """ This is a test I can write """
        request = FakeRequest()
        mystring = str('<<<<this is a test string>>>>')
 
    def test_maxlength_textarea_widget(self):
        """ Show me HOW to write this test and I will ~Spanky """
 
        request = FakeRequest()
        mystring = str('The little black dog jumped over the sleeping Moose')
    def test_rich_text_widget(self):
        request = FakeRequest()
        doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')
        field = doc.Schema()['richtextfield']
        widget = field.widget

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_widgets.py   Products.Archetypes(Download)
from Products.Archetypes.tests.utils import PACKAGE_HOME
from Products.Archetypes.tests.utils import makeContent
from Products.Archetypes.tests.test_fields import FakeRequest
from DateTime import DateTime
 
    def test_appendtextarea_widget(self):
        request = FakeRequest()
        mystring = str('<<<<this is a test string>>>>')
 
        doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')
    def test_appendtextarea_timestamp_widget(self):
        """ This is a test I can write """
        request = FakeRequest()
        mystring = str('<<<<this is a test string>>>>')
 
    def test_maxlength_textarea_widget(self):
        """ Show me HOW to write this test and I will ~Spanky """
 
        request = FakeRequest()
        mystring = str('The little black dog jumped over the sleeping Moose')
    def test_rich_text_widget(self):
        request = FakeRequest()
        doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')
        field = doc.Schema()['richtextfield']
        widget = field.widget

src/m/e/medialog.emailfield-0.1b1/medialog/emailfield/tests/test_emailfield.py   medialog.emailfield(Download)
from Products.Archetypes.atapi import *
from Products.Archetypes.tests.test_fields import FakeRequest
from Products.Archetypes.tests.test_fields import DummyVocabulary
 
from medialog.emailfield.field import EmailField 
    def test_processing(self):
        dummy = self.makeDummy()
        request = FakeRequest()
        request.form.update(field_values)
        dummy.REQUEST = request
    def test_validation(self):
        dummy = self.makeDummy()
        request = FakeRequest()
        request.form.update({'email':'xxx'})
        request.form['fieldset'] = 'default'
    def test_defaults(self):
        dummy = self.makeDummy()
        request = FakeRequest()
        field =  dummy.getField('email')
 

src/p/r/Products.PloneArticle-4.2.0/Products/PloneArticle/tests/test_smartlistfield.py   Products.PloneArticle(Download)
# Archetypes imports
from Products.Archetypes.tests.utils import mkDummyInContext, makeContent
from Products.Archetypes.tests.test_fields import Dummy, FakeRequest
from Products.Archetypes.atapi import Schema
from Products.Archetypes.Registry import fieldDescriptionRegistry

src/p/r/Products.PloneArticle-4.2.0/Products/PloneArticle/tests/test_innercontentfield.py   Products.PloneArticle(Download)
# Archetypes imports
from Products.Archetypes.tests.utils import mkDummyInContext
from Products.Archetypes.tests.test_fields import FakeRequest as BaseRequest
#from zope.publisher.browser import TestRequest
from Products.Archetypes.public import Schema, BaseFolderMixin
class FakeRequest(BaseRequest):
    def __setitem__(self, key, value):
        self.other[key] = value
        return
 

src/c/o/collective.searchandreplace-3.1/collective/searchandreplace/tests/test_replacewhere.py   collective.searchandreplace(Download)
from AccessControl import Unauthorized
from base import SearchAndReplaceTestCase
from Products.Archetypes.tests.test_fields import FakeRequest
 
 
    def afterSetUp(self):
        self.srtool = self.portal.portal_search_and_replace
        self.request = FakeRequest()
 
    def testReplaceText(self):

src/c/o/collective.searchandreplace-3.1/collective/searchandreplace/tests/test_regex.py   collective.searchandreplace(Download)
from AccessControl import Unauthorized
from base import SearchAndReplaceTestCase
from Products.Archetypes.tests.test_fields import FakeRequest
 
 
    def afterSetUp(self):
        self.srtool = self.portal.portal_search_and_replace
        self.request = FakeRequest()
 
    def testRegex(self):

src/c/o/collective.searchandreplace-3.1/collective/searchandreplace/tests/test_matchcase.py   collective.searchandreplace(Download)
from AccessControl import Unauthorized
from base import SearchAndReplaceTestCase
from Products.Archetypes.tests.test_fields import FakeRequest
 
 
    def afterSetUp(self):
        self.srtool = self.portal.portal_search_and_replace
        self.request = FakeRequest()
 
    def testNoMatchCase(self):

src/m/e/medialog.fullnamefield-0.1b1/medialog/fullnamefield/tests/test_fullnamefield.py   medialog.fullnamefield(Download)
from Products.Archetypes.atapi import *
from Products.Archetypes.tests.test_fields import FakeRequest
from Products.Archetypes.tests.test_fields import DummyVocabulary
 
from medialog.fullnamefield.field import FullnameField 
    def test_processing(self):
        dummy = self.makeDummy()
        request = FakeRequest()
        request.form.update(field_values)
        dummy.REQUEST = request
    def test_defaults(self):
        dummy = self.makeDummy()
        request = FakeRequest()
        field =  dummy.getField('fullname')