Back to index

moin  1.9.0~rc2
Public Member Functions
test_groups.TestGroupFormatterCreole Class Reference

List of all members.

Public Member Functions

def get_members
def test_CamelCase
def test_extended_name
def test_extended_link
def test_extended_link_with_label
def test_extended_link_and_text
def test_ignore_not_first_level_list
def test_indented_list
def test_ignore_other
def test_strip_whitespace

Detailed Description

Definition at line 120 of file test_groups.py.


Member Function Documentation

Definition at line 122 of file test_groups.py.

00122 
00123     def get_members(self, text):
00124         request = self.request
00125         formatter = Formatter(self.request)
00126 
00127         become_trusted(request)
00128         create_page(request, u'TestPageGroup', "#FORMAT creole \n" + text)
00129         page = Page(request, 'TestPageGroup', formatter=formatter)
00130         page.send_page(content_only=True)
00131         nuke_page(request, u'TestPageGroup')
00132 
00133         return formatter.members

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 134 of file test_groups.py.

00134 
00135     def test_CamelCase(self):
00136         text = """
00137  * CamelCase
00138 """
00139         members = self.get_members(text)
00140         assert len(members) == 1
00141         assert u'CamelCase' in members

Here is the call graph for this function:

Definition at line 150 of file test_groups.py.

00150 
00151     def test_extended_link(self):
00152         text = """
00153  * [[extended link]]
00154 """
00155         members = self.get_members(text)
00156         assert len(members) == 1
00157         assert u'extended link' in members

Here is the call graph for this function:

Definition at line 166 of file test_groups.py.

00166 
00167     def test_extended_link_and_text(self):
00168         text = """
00169  * [[extended link]] other text
00170  * other text [[extended link]]
00171  * other text [[extended link]] other text
00172 
00173 """
00174         members = self.get_members(text)
00175         assert len(members) == 3
00176         assert u'extended link other text' in members
00177         assert u'other text extended link' in members
00178         assert u'other text extended link other text' in members

Here is the call graph for this function:

Definition at line 158 of file test_groups.py.

00158 
00159     def test_extended_link_with_label(self):
00160         text = """
00161  * [[FrontPage|named link]]
00162 """
00163         members = self.get_members(text)
00164         assert len(members) == 1
00165         assert u'FrontPage' in members

Here is the call graph for this function:

Definition at line 142 of file test_groups.py.

00142 
00143     def test_extended_name(self):
00144         text = """
00145  * extended name
00146 """
00147         members = self.get_members(text)
00148         assert len(members) == 1
00149         assert u'extended name' in members

Here is the call graph for this function:

Definition at line 179 of file test_groups.py.

00179 
00180     def test_ignore_not_first_level_list(self):
00181         text = """
00182 * first level
00183 ** second level
00184 *** [[SomeLink]]
00185 **** forth level
00186 ***** and then some...
00187 * again first level
00188 """
00189         members = self.get_members(text)
00190         assert len(members) == 2
00191         assert 'first level' in members
00192         assert 'again first level' in members

Here is the call graph for this function:

Definition at line 207 of file test_groups.py.

00207 
00208     def test_ignore_other(self):
00209         text = """
00210 = ignore this =
00211  * take this
00212 
00213 Ignore previous line and this text.
00214 """
00215         members = self.get_members(text)
00216         assert len(members) == 1
00217         assert u'take this' in members

Here is the call graph for this function:

Definition at line 193 of file test_groups.py.

00193 
00194     def test_indented_list(self):
00195         text = """
00196     * first level
00197     ** second level
00198     *** [[SomeLink|label]]
00199     **** forth level
00200     ***** and then some...
00201     * again first level
00202 """
00203         members = self.get_members(text)
00204         assert len(members) == 2
00205         assert 'first level' in members
00206         assert 'again first level' in members

Here is the call graph for this function:

Definition at line 218 of file test_groups.py.

00218 
00219     def test_strip_whitespace(self):
00220         text = """
00221  *   take this
00222 """
00223         members = self.get_members(text)
00224         assert len(members) == 1
00225         assert u'take this' in members
00226 

Here is the call graph for this function:


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