Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFDefault.tests.test_RegistrationTool.RegistrationToolTests Class Reference
Inheritance diagram for CMFDefault.tests.test_RegistrationTool.RegistrationToolTests:
Inheritance graph
[legend]
Collaboration diagram for CMFDefault.tests.test_RegistrationTool.RegistrationToolTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def tearDown
def test_z2interfaces
def test_z3interfaces
def test_spamcannon_collector_243

Private Member Functions

def _getTargetClass
def _makeOne

Detailed Description

Definition at line 34 of file test_RegistrationTool.py.


Member Function Documentation

Definition at line 36 of file test_RegistrationTool.py.

00036 
00037     def _getTargetClass(self):
00038         from Products.CMFDefault.RegistrationTool import RegistrationTool
00039 
00040         return RegistrationTool

def CMFDefault.tests.test_RegistrationTool.RegistrationToolTests._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 41 of file test_RegistrationTool.py.

00041 
00042     def _makeOne(self, *args, **kw):
00043         return self._getTargetClass()(*args, **kw)

Definition at line 44 of file test_RegistrationTool.py.

00044 
00045     def tearDown(self):
00046         cleanUp()
00047         RequestTest.tearDown(self)

Here is the call graph for this function:

Definition at line 61 of file test_RegistrationTool.py.

00061 
00062     def test_spamcannon_collector_243( self ):
00063 
00064         INJECTED_HEADERS = """
00065 To:someone@example.com
00066 cc:another_victim@elsewhere.example.com
00067 From:someone@example.com
00068 Subject:Hosed by Spam Cannon!
00069 
00070 Spam, spam, spam
00071 """
00072 
00073         rtool = self._makeOne().__of__(self.app)
00074         self.app.portal_membership = FauxMembershipTool()
00075 
00076         props = { 'email' : INJECTED_HEADERS
00077                 , 'username' : 'username'
00078                 }
00079 
00080         result = rtool.testPropertiesValidity(props, None)
00081 
00082         self.failIf( result is None, 'Invalid e-mail passed inspection' )
00083 

Definition at line 48 of file test_RegistrationTool.py.

00048 
00049     def test_z2interfaces(self):
00050         from Interface.Verify import verifyClass
00051         from Products.CMFCore.interfaces.portal_registration \
00052                 import portal_registration as IRegistrationTool
00053 
00054         verifyClass(IRegistrationTool, self._getTargetClass())

Definition at line 55 of file test_RegistrationTool.py.

00055 
00056     def test_z3interfaces(self):
00057         from zope.interface.verify import verifyClass
00058         from Products.CMFCore.interfaces import IRegistrationTool
00059 
00060         verifyClass(IRegistrationTool, self._getTargetClass())


The documentation for this class was generated from the following file: