Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
test_GetVal.TestGetVal Class Reference
Collaboration diagram for test_GetVal.TestGetVal:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setup_class
def teardown_class
def testGetValNoACLs
def testGetValAfterADictPageIsDeleted
def testGetValACLs

Public Attributes

 cfg

Static Public Attributes

string pagename = u'MyDict'

Private Member Functions

def _test_macro

Detailed Description

GetVal: testing getVal macro 

Definition at line 15 of file test_GetVal.py.


Member Function Documentation

def test_GetVal.TestGetVal._test_macro (   self,
  name,
  args,
  page 
) [private]

Definition at line 26 of file test_GetVal.py.

00026 
00027     def _test_macro(self, name, args, page):
00028         m = make_macro(self.request, page)
00029         return m.execute(name, args)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 19 of file test_GetVal.py.

00019 
00020     def setup_class(self):
00021         become_trusted(self.request)
00022         self.cfg = self.request.cfg

Here is the call graph for this function:

Definition at line 23 of file test_GetVal.py.

00023 
00024     def teardown_class(self):
00025         nuke_page(self.request, self.pagename)

Here is the call graph for this function:

macro GetVal test: 'cant read VAR on an ACL protected page' 

Definition at line 47 of file test_GetVal.py.

00047 
00048     def testGetValACLs(self):
00049         """ macro GetVal test: 'cant read VAR on an ACL protected page' """
00050         py.test.skip("user has no rights to create acl pages")
00051         page = create_page(self.request, self.pagename,
00052                            '#acl SomeUser:read,write All:delete\n VAR:: This is an example')
00053         result = self._test_macro(u'GetVal', "%s,%s" % (self.pagename, u'VAR'), page)
00054         assert result == "<<GetVal: You don't have enough rights on this page>>"

Here is the call graph for this function:

macro GetVal test: 'reads Dict var after another Dict is removed' 

Definition at line 36 of file test_GetVal.py.

00036 
00037     def testGetValAfterADictPageIsDeleted(self):
00038         """ macro GetVal test: 'reads Dict var after another Dict is removed' """
00039         request = self.request
00040         become_trusted(request)
00041         page = create_page(request, u'SomeDict', u" EXAMPLE:: This is an example text")
00042         page.deletePage()
00043         page = create_page(request, self.pagename, u' VAR:: This is a brand new example')
00044         result = self._test_macro(u'GetVal', "%s,%s" % (self.pagename, u'VAR'), page)
00045         nuke_page(request, u'SomeDict')
00046         assert result == "This is a brand new example"

Here is the call graph for this function:

macro GetVal test: 'reads VAR' 

Definition at line 30 of file test_GetVal.py.

00030 
00031     def testGetValNoACLs(self):
00032         """ macro GetVal test: 'reads VAR' """
00033         page = create_page(self.request, self.pagename, u' VAR:: This is an example')
00034         result = self._test_macro(u'GetVal', "%s,%s" % (self.pagename, u'VAR'), page)
00035         assert result == "This is an example"

Here is the call graph for this function:


Member Data Documentation

Definition at line 21 of file test_GetVal.py.

string test_GetVal.TestGetVal.pagename = u'MyDict' [static]

Definition at line 17 of file test_GetVal.py.


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