moved sources into subdirectory for easier setup
This commit is contained in:
parent
4f91a30fec
commit
d93f8ce937
190 changed files with 4 additions and 4 deletions
appy/pod/test/contexts
Chart1.pyColgroupTable.pyElseStatements.pyEmpty.pyFieldExpressions.pyFileHandlerImport.pyForCell6.pyIfAndFors1.pyImagesImport.pyOdsSimple.pyOnlyExpressions.pyPathImport.pyPersonsEight.pyPersonsFour.pyPersonsThree.pyPersonsTwo.pySimpleForEmptyList.pySimpleForFilledList.pySimpleForRow.pySimpleIfIsFalse.pySimpleIfIsTrue.pySimpleTest.pyVarStatements.pyXhtmlComplex.pyXhtmlComplex2.pyXhtmlComplex3.pyXhtmlComplex4.pyXhtmlComplex5.pyXhtmlComplex6.pyXhtmlComplex7.pyXhtmlComplex8.pyXhtmlComplexTables.pyXhtmlEntities.pyXhtmlKeepWithNext.pyXhtmlNominal.pyXhtmlStylesErrors.pyXhtmlStylesMapping.pyXhtmlTables.pyXhtmlWithStyle.py__init__.py
5
appy/pod/test/contexts/Chart1.py
Normal file
5
appy/pod/test/contexts/Chart1.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
johnScore = 25
|
||||
markScore = 53
|
||||
wilsonScore = 12
|
||||
meghuScore = 59
|
||||
|
137
appy/pod/test/contexts/ColgroupTable.py
Normal file
137
appy/pod/test/contexts/ColgroupTable.py
Normal file
|
@ -0,0 +1,137 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput='''
|
||||
<table cellspacing="0" cellpadding="0" id="configabsences_cal" class="list timeline">
|
||||
<colgroup>
|
||||
<col width="100px"/>
|
||||
<col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/><col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/><col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/><col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/><col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/><col style=""/><col style=""/><col style=""/><col style=""/><col style="background-color: #dedede"/><col style="background-color: #c0c0c0"/><col style="background-color: #c0c0c0"/>
|
||||
<col style="width: 75px"/>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr><th></th>
|
||||
<th colspan="6">Février 2015</th><th colspan="31">Mars 2015</th><th colspan="5"><acronym title="Avril 2015">A</acronym></th><th></th></tr>
|
||||
<tr><td></td> <td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td>
|
||||
<td></td></tr>
|
||||
<tr><td></td> <td><b>23</b></td><td><b>24</b></td><td><b>25</b></td><td><b>26</b></td><td><b>27</b></td><td><b>28</b></td><td><b>01</b></td><td><b>02</b></td><td><b>03</b></td><td><b>04</b></td><td><b>05</b></td><td><b>06</b></td><td><b>07</b></td><td><b>08</b></td><td><b>09</b></td><td><b>10</b></td><td><b>11</b></td><td><b>12</b></td><td><b>13</b></td><td><b>14</b></td><td><b>15</b></td><td><b>16</b></td><td><b>17</b></td><td><b>18</b></td><td><b>19</b></td><td><b>20</b></td><td><b>21</b></td><td><b>22</b></td><td><b>23</b></td><td><b>24</b></td><td><b>25</b></td><td><b>26</b></td><td><b>27</b></td><td><b>28</b></td><td><b>29</b></td><td><b>30</b></td><td><b>31</b></td><td><b>01</b></td><td><b>02</b></td><td><b>03</b></td><td><b>04</b></td><td><b>05</b></td>
|
||||
<td></td></tr>
|
||||
<tr>
|
||||
<td class="tlLeft"><a target="_blank" href="http://localhost:8080/config/GardesUser1350721915326376433960017169/view?page=preferences"><acronym title="Barbason Alain">AB</acronym></a></td>
|
||||
<td style="background-color: #E5B620"></td>
|
||||
<td style="background-color: #E5B620"></td>
|
||||
<td style="background-color: #E5B620"></td>
|
||||
<td></td>
|
||||
<td style="background-color: #E5B620"></td>
|
||||
<td style="background-color: #E5B620"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td style="background-color: #13751F"></td>
|
||||
<td style="background-color: #13751F"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td title="Congé (AM), Congrès (PM)" style="background-image: url(http://localhost:8080/ui/angled.png)"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="tlRight"><a target="_blank" href="http://localhost:8080/config/GardesUser1350721915326376433960017169/view?page=preferences"><acronym title="Barbason Alain">AB</acronym></a></td>
|
||||
</tr><tr>
|
||||
<td class="tlLeft"><a target="_blank" href="http://localhost:8080/config/GardesUser1350721915119231834005028903/view?page=preferences"><acronym title="Blom-Peters Lucien">LB</acronym></a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td style="background-color: #d08181"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="tlRight"><a target="_blank" href="http://localhost:8080/config/GardesUser1350721915119231834005028903/view?page=preferences"><acronym title="Blom-Peters Lucien">LB</acronym></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="configabsences_trs">
|
||||
<script>new AjaxData('configabsences_trs', 'absences:pxTotalRowsFromAjax', {}, 'configabsences')</script>
|
||||
<tr>
|
||||
<td class="tlLeft">
|
||||
<acronym title="Nombre de travailleurs disponibles"><b>P</b></acronym></td>
|
||||
<td>42</td><td>42</td><td>41</td><td>42</td><td>41</td><td>39</td><td>40</td><td>42</td><td>41</td><td>41</td><td>41</td><td>42</td><td>37</td><td>37</td><td>41</td><td>42</td><td>40</td><td>39</td><td>39</td><td>37</td><td>37</td><td>39</td><td>37</td><td>36</td><td>36</td><td>36</td><td>31</td><td>32</td><td>38</td><td>39</td><td>39</td><td>39</td><td>38</td><td>37</td><td>37</td><td>42</td><td>41</td><td>41</td><td>41</td><td>42</td><td>33</td><td>33</td>
|
||||
<td class="tlRight">
|
||||
<acronym title="Nombre de travailleurs disponibles"><b>P</b></acronym></td>
|
||||
</tr><tr>
|
||||
<td class="tlLeft">
|
||||
<acronym title="Nombre total de travailleurs"><b>T</b></acronym></td>
|
||||
<td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td><td>46</td>
|
||||
<td class="tlRight">
|
||||
<acronym title="Nombre total de travailleurs"><b>T</b></acronym></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
|
||||
<tr><td></td>
|
||||
<td><b>23</b></td><td><b>24</b></td><td><b>25</b></td><td><b>26</b></td><td><b>27</b></td><td><b>28</b></td><td><b>01</b></td><td><b>02</b></td><td><b>03</b></td><td><b>04</b></td><td><b>05</b></td><td><b>06</b></td><td><b>07</b></td><td><b>08</b></td><td><b>09</b></td><td><b>10</b></td><td><b>11</b></td><td><b>12</b></td><td><b>13</b></td><td><b>14</b></td><td><b>15</b></td><td><b>16</b></td><td><b>17</b></td><td><b>18</b></td><td><b>19</b></td><td><b>20</b></td><td><b>21</b></td><td><b>22</b></td><td><b>23</b></td><td><b>24</b></td><td><b>25</b></td><td><b>26</b></td><td><b>27</b></td><td><b>28</b></td><td><b>29</b></td><td><b>30</b></td><td><b>31</b></td><td><b>01</b></td><td><b>02</b></td><td><b>03</b></td><td><b>04</b></td><td><b>05</b></td>
|
||||
<td></td></tr>
|
||||
<tr><td></td>
|
||||
<td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td><td><b>L</b></td><td><b>M</b></td><td><b>M</b></td><td><b>J</b></td><td><b>V</b></td><td><b>S</b></td><td><b>D</b></td>
|
||||
<td></td></tr>
|
||||
|
||||
<tr><th></th>
|
||||
<th colspan="6">Février 2015</th><th colspan="31">Mars 2015</th><th colspan="5"><acronym title="Avril 2015">A</acronym></th><th></th></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
'''
|
10
appy/pod/test/contexts/ElseStatements.py
Normal file
10
appy/pod/test/contexts/ElseStatements.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
trueCondition = True
|
||||
falseCondition = False
|
||||
|
||||
class O:
|
||||
def __init__(self, v):
|
||||
self.v = v
|
||||
self.vv = v+v
|
||||
|
||||
oooo = [O('a'), O('b'), O('c'), O('d')]
|
||||
|
1
appy/pod/test/contexts/Empty.py
Normal file
1
appy/pod/test/contexts/Empty.py
Normal file
|
@ -0,0 +1 @@
|
|||
# This file is really empty.
|
2
appy/pod/test/contexts/FieldExpressions.py
Normal file
2
appy/pod/test/contexts/FieldExpressions.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
old = 'OLD'
|
||||
new = 'NEW'
|
6
appy/pod/test/contexts/FileHandlerImport.py
Normal file
6
appy/pod/test/contexts/FileHandlerImport.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
import os.path
|
||||
import appy
|
||||
|
||||
def getFileHandler():
|
||||
return file('%s/pod/test/templates/NoPython.odt' % os.path.dirname(appy.__file__))
|
||||
|
17
appy/pod/test/contexts/ForCell6.py
Normal file
17
appy/pod/test/contexts/ForCell6.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
class Student:
|
||||
def __init__(self, **kwargs):
|
||||
for k, v in kwargs.items():
|
||||
setattr(self, k, v)
|
||||
|
||||
students = [
|
||||
Student(parent_guardian='Parent 1', street='Street 1', city='Flawinne',
|
||||
state='Namur', zip='5020', lname='Name 1', fname='First name 1'),
|
||||
Student(parent_guardian='Parent 2', street='Street 2', city='Flawinne',
|
||||
state='Namur', zip='5020', lname='Name 2', fname='First name 2'),
|
||||
Student(parent_guardian='Parent 3', street='Street 3', city='Flawinne',
|
||||
state='Namur', zip='5020', lname='Name 3', fname='First name 3'),
|
||||
Student(parent_guardian='Parent 4', street='Street 4', city='Flawinne',
|
||||
state='Namur', zip='5020', lname='Name 4', fname='First name 4'),
|
||||
Student(parent_guardian='Parent 5', street='Street 5', city='Flawinne',
|
||||
state='Namur', zip='5020', lname='Name 5', fname='First name 5'),
|
||||
]
|
3
appy/pod/test/contexts/IfAndFors1.py
Normal file
3
appy/pod/test/contexts/IfAndFors1.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from appy.pod.test.contexts import Group
|
||||
|
||||
groups = [Group('group1'), Group('group2'), Group('toto')]
|
6
appy/pod/test/contexts/ImagesImport.py
Normal file
6
appy/pod/test/contexts/ImagesImport.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
import os.path
|
||||
import appy
|
||||
|
||||
def getAppyPath():
|
||||
return os.path.dirname(appy.__file__)
|
||||
|
4
appy/pod/test/contexts/OdsSimple.py
Normal file
4
appy/pod/test/contexts/OdsSimple.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
data = [ \
|
||||
['1', 2, 'three'],
|
||||
['A', 'BB', 'CCC']
|
||||
]
|
3
appy/pod/test/contexts/OnlyExpressions.py
Normal file
3
appy/pod/test/contexts/OnlyExpressions.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
expr1 = 'hello'
|
||||
i1 = 45
|
||||
f1 = 78.05
|
6
appy/pod/test/contexts/PathImport.py
Normal file
6
appy/pod/test/contexts/PathImport.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
import os.path
|
||||
import appy
|
||||
|
||||
def getAppyPath():
|
||||
return os.path.dirname(appy.__file__)
|
||||
|
4
appy/pod/test/contexts/PersonsEight.py
Normal file
4
appy/pod/test/contexts/PersonsEight.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from appy.pod.test.contexts import Person
|
||||
|
||||
persons = [Person('P1'), Person('P2'), Person('P3'), Person('P4'),
|
||||
Person('P5'), Person('P6'), Person('P7'), Person('P8')]
|
3
appy/pod/test/contexts/PersonsFour.py
Normal file
3
appy/pod/test/contexts/PersonsFour.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from appy.pod.test.contexts import Person
|
||||
|
||||
persons = [Person('P1'), Person('P2'), Person('P3'), Person('P4')]
|
3
appy/pod/test/contexts/PersonsThree.py
Normal file
3
appy/pod/test/contexts/PersonsThree.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from appy.pod.test.contexts import Person
|
||||
|
||||
persons = [Person('P1'), Person('P2'), Person('P3')]
|
3
appy/pod/test/contexts/PersonsTwo.py
Normal file
3
appy/pod/test/contexts/PersonsTwo.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from appy.pod.test.contexts import Person
|
||||
|
||||
persons = [Person('P1'), Person('P2')]
|
1
appy/pod/test/contexts/SimpleForEmptyList.py
Normal file
1
appy/pod/test/contexts/SimpleForEmptyList.py
Normal file
|
@ -0,0 +1 @@
|
|||
list1 = []
|
1
appy/pod/test/contexts/SimpleForFilledList.py
Normal file
1
appy/pod/test/contexts/SimpleForFilledList.py
Normal file
|
@ -0,0 +1 @@
|
|||
list1 = ['Hello', 'World', 45, True]
|
3
appy/pod/test/contexts/SimpleForRow.py
Normal file
3
appy/pod/test/contexts/SimpleForRow.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from appy.pod.test.contexts import Person
|
||||
|
||||
persons = [Person('Mr 1'), Person('Ms One'), Person('Misss two')]
|
1
appy/pod/test/contexts/SimpleIfIsFalse.py
Normal file
1
appy/pod/test/contexts/SimpleIfIsFalse.py
Normal file
|
@ -0,0 +1 @@
|
|||
c1 = False
|
1
appy/pod/test/contexts/SimpleIfIsTrue.py
Normal file
1
appy/pod/test/contexts/SimpleIfIsTrue.py
Normal file
|
@ -0,0 +1 @@
|
|||
c1 = True
|
2
appy/pod/test/contexts/SimpleTest.py
Normal file
2
appy/pod/test/contexts/SimpleTest.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
IWillTellYouWhatInAMoment = 'return'
|
||||
beingPaidForIt = True
|
2
appy/pod/test/contexts/VarStatements.py
Normal file
2
appy/pod/test/contexts/VarStatements.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
var1 = 'VAR1 not overridden'
|
||||
var2 = 'VAR2 not overridden'
|
25
appy/pod/test/contexts/XhtmlComplex.py
Normal file
25
appy/pod/test/contexts/XhtmlComplex.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Te<b>s</b>t1 : <b>bold</b>, i<i>tal</i>ics, exponent<sup>34</sup>, sub<sub>45</sub>.</p>
|
||||
<p>An <a href="http://www.google.com">hyperlink</a> to Google.</p>
|
||||
<ol><li>Number list, item 1</li>
|
||||
<ol><li>Sub-item 1</li><li>Sub-Item 2</li>
|
||||
<ol><li>Sub-sub-item A</li><li>Sub-sub-item B <i>italic</i>.</li></ol>
|
||||
</ol>
|
||||
</ol>
|
||||
<ul><li>A bullet</li>
|
||||
<ul><li>A sub-bullet</li>
|
||||
<ul><li>A sub-sub-bullet</li></ul>
|
||||
<ol><li>A sub-sub number</li><li>Another.<br /></li></ol>
|
||||
</ul>
|
||||
</ul>
|
||||
<h2>Heading<br /></h2>
|
||||
Heading Blabla.<br />
|
||||
<h3>SubHeading</h3>
|
||||
Subheading blabla.<br />
|
||||
'''
|
||||
# I need a class.
|
||||
class D:
|
||||
def getAt1(self):
|
||||
return xhtmlInput
|
||||
dummy = D()
|
30
appy/pod/test/contexts/XhtmlComplex2.py
Normal file
30
appy/pod/test/contexts/XhtmlComplex2.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<div><strong>Programmes FSE Convergence et Compétitivité
|
||||
régionale et emploi.</strong></div>'''
|
||||
|
||||
xhtmlInput2 = '''<b>Walloon entreprises, welcome !</b><br/>
|
||||
<br/>
|
||||
This site will allow you to get simple answers to those questions:<br/>
|
||||
- am I an SME or not ?<br/>
|
||||
- to which incentives may I postulate for, in Wallonia, according to my size?
|
||||
<br/>The little test which you will find on this site is based on the European
|
||||
Recommendation of May 6th, 2003. It was enforced on January 1st, 2005.
|
||||
Most of the incentives that are available for SMEs in Wallonia are based
|
||||
on the SME definition proposed by this recommandation.<br/><br/>
|
||||
|
||||
Incentives descriptions come from the
|
||||
<a href="http://economie.wallonie.be/" target="_blank">MIDAS</a>
|
||||
database and represent all incentives that are available on the Walloon
|
||||
territory, whatever public institution is proposing it.<br/><br/>
|
||||
|
||||
<b>Big enterprises, do not leave !</b><br/><br/>
|
||||
|
||||
If this sites classifies you as a big enterprise, you will be able to consult
|
||||
all incentives that are targeted to you.'''
|
||||
|
||||
xhtmlInput3 = '''
|
||||
<div><strong>Programmes A</strong></div>
|
||||
<div>Programmes B</div>
|
||||
<div><strong>Programmes C</strong></div>
|
||||
<ul><li>a</li><li>b</li></ul>'''
|
95
appy/pod/test/contexts/XhtmlComplex3.py
Normal file
95
appy/pod/test/contexts/XhtmlComplex3.py
Normal file
|
@ -0,0 +1,95 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<ol><li>
|
||||
<p>Test du champ kupu<br />A la ligne
|
||||
1, j'y suis</p>
|
||||
<ol><li>
|
||||
<p>Ligne 1 de 1<br />A la ligne 1 de 1
|
||||
fdsfds fsd fsd fksdf sdfs dfd sfsd fsd fsd fdsf dsfds fsdfa azra
|
||||
zeeamr earkl kfl flks dlfksd lfklsd fklmsdfkl dskflmdsk flmsdf
|
||||
lmdsflm dflsdfs fksd fmlsd flmdsk flmdsf mlsfkmls<br />A la ligne 2
|
||||
de 1 cds fdsn sfd dsjfl dsjfhjds fhjdsf lqdhf klsfql kjfk jfkj
|
||||
qfklmqds fjdlksqfj kdlfj klqfk qfjk ljfqklq djfklqjf qfk jkfljqd
|
||||
sklfjqdklfjqdkl fjdqklf jdqlkfj qfq</p>
|
||||
</li><li>
|
||||
<p>Ligne 2 de 1<br />A la ligne 1 de 2
|
||||
fdsfds fsd fsd fksdf sdfs dfd sfsd fsd fsd fdsf dsfds fsdfa azra
|
||||
zeeamr earkl kfl flks dlfksd lfklsd fklmsdfkl dskflmdsk flmsdf
|
||||
lmdsflm dflsdfs fksd fmlsd flmdsk flmdsf mlsfkmls<br />A la ligne 2
|
||||
de 2 cds fdsn sfd dsjfl dsjfhjds fhjdsf lqdhf klsfql kjfk jfkj
|
||||
qfklmqds fjdlksqfj kdlfj klqfk qfjk ljfqklq djfklqjf qfk jkfljqd
|
||||
sklfjqdklfjqdkl fjdqklf jdqlkfj qf</p>
|
||||
</li></ol>
|
||||
</li><li>
|
||||
<p>Ligne 2 tout court</p>
|
||||
<ol><li>
|
||||
<p>Ligne bullet dg fg dgd fgdf gdfg
|
||||
dgq fg fgfq gfqd gfqg qfg qgkqlglk lgkl fkgkfq lmgkl mfqfkglmfk
|
||||
gmlqf gmlqfgml kfmglk qmglk qmlgk qmlgkqmflgk qmlqg fmdlmslgk
|
||||
mlsgml fskfmglk gmlkflmg ksfmlgk mlsgk</p>
|
||||
</li><li>
|
||||
<p>dsfl kqfs dmflm dsfsdf lskfmls
|
||||
dkflmsdkf sdlmkf dslmfk sdmlfksd mlfksdmfl ksflmksdflmd slfmskd
|
||||
lsmlfk mlsdfkl mskfmlsfk lmskfsfs</p>
|
||||
</li><li>
|
||||
<p>fmlsdm ùfkùds fldsf ùsfsdmfù
|
||||
mdsfù msdùfms</p>
|
||||
</li><li>
|
||||
<p>fds fsd fdsf sdfds fsmd fmjdfklm
|
||||
sdflmkd lfqlmklmdsqkflmq dskflmkd slmgkqdfmglklfmgksmldgk
|
||||
dmlsgdkdlm fgkmdl fkgdmlfsgk mlfgksmdl fgkmldsf klmmdfkg mlsdfkgml
|
||||
skfdgml skgmlkfd smlgksd mlkgml kml</p>
|
||||
</li><li>
|
||||
<p>lgd ksmlgjk mlsdfgkml sdfkglm
|
||||
kdsfmlgk dlmskgsldmgk lms</p>
|
||||
</li></ol>
|
||||
</li><li>
|
||||
<p>Ligne 3 tout court</p>
|
||||
</li></ol>
|
||||
<br />'''
|
||||
|
||||
xhtmlInput2 = '''
|
||||
<ol start="1"><li>Le Gouvernement approuve la réaffectation de 20.056.989 € attribués dans le cadre du CRAC II et l’affectation du solde de 20.855.107 € du solde des CRAC Ibis et II au sein du secteur des hôpitaux de l’enveloppe de financement alternatif pour un montant total de 40.921.096 €, au bénéfice des établissements suivants :<br /><br /></li>
|
||||
<table align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Etablissement</b></td>
|
||||
<td>
|
||||
<p align="center" style="text-align: center;"><b>CRAC II Phase II</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>C.H. Chrétien Liège</p>
|
||||
</td>
|
||||
<td nowrap="-1">
|
||||
<p align="center" style="text-align: center;">11.097.377</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap="-1">
|
||||
<p>Hôp. St-Joseph, Ste-Thérèse et IMTR Gilly</p>
|
||||
</td>
|
||||
<td nowrap="-1">
|
||||
<p align="center" style="text-align: center;">8.297.880</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br /><li>Il prend acte des décisions du Ministre de la Santé relatives à l’octroi de la règle de 10/90 pour la subsidiation des infrastructures des établissements concernés.<br /></li>
|
||||
<li>Le Gouvernement charge le Ministre de la Santé d’appliquer, le cas échéant, les nouveaux plafonds à la construction visés dans l’arrêté ministériel du 11 mai 2007 fixant le coût maximal pouvant être pris en considération pour l’octroi des subventions pour la construction de nouveaux bâtiments, les travaux d’extension et de reconditionnement d’un hôpital ou d’un service, aux demandes d’octroi de subventions antérieures au 1<sup>er</sup> janvier 2006, pour autant que ces demandes d’octroi de subventions n’aient pas encore donné lieu à l’exploitation à cette même date.<br /></li>
|
||||
<li>Il charge le Ministre de la Santé de l’exécution de la présente décision</li></ol>
|
||||
<p></p>
|
||||
'''
|
||||
|
||||
xhtmlInput3 = '''
|
||||
<ol><li>Le Gouvernement l'exercice 2008.</li><li>Il approuve 240.000€ de007-2008.</li><li>Le Gouvernement approuve:
|
||||
<ul><li>le projet d'arrêté ministériel 008;</li><li>le projet d'arrêté ministériel mique 2008-2009.</li></ul></li><li>Le Gouvernement charge le Ministre de l'Economie de l'exécution de la présente décision.</li></ol>
|
||||
'''
|
||||
|
||||
xhtmlInput4 = '''
|
||||
<div><strong>Programmes FSE Convergence et Compétitivité régionale et emploi.</strong></div>
|
||||
<div><strong>Axe 1, mesure 1, et Axe 2, mesures 2, 3, 4 et 5 : formation.</strong></div>
|
||||
<div><strong>Portefeuille de projets « Enseignement supérieur - Formation continue ».</strong></div>
|
||||
'''
|
44
appy/pod/test/contexts/XhtmlComplex4.py
Normal file
44
appy/pod/test/contexts/XhtmlComplex4.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Champ FCK</p>
|
||||
<ol>
|
||||
<li>aaaa
|
||||
<ol>
|
||||
<li>Azerty</li>
|
||||
<li>aaaa</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>edzfrgh</li>
|
||||
<li>Kupu</li>
|
||||
</ol>
|
||||
<table cellspacing="1" cellpadding="1" border="1" style="width: 210px; height: 66px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>a</td>
|
||||
<td>b</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x</td>
|
||||
<td>vvv</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bbb</td>
|
||||
<td>vvvvv</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p style="margin-left: 40px;">hghdghghgh</p>
|
||||
<ul>
|
||||
<li>aaa</li>
|
||||
<li> </li>
|
||||
<li>bvbb</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>regrg</li>
|
||||
<li> </li>
|
||||
</ol>
|
||||
<p>vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù</p>
|
||||
<p> </p>
|
||||
<p>vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@èù vghriqghrghgfd hgkll hgjkf lghjfkd slhgjfd klhgjfds klghjfds s&é@</p>
|
||||
'''
|
60
appy/pod/test/contexts/XhtmlComplex5.py
Normal file
60
appy/pod/test/contexts/XhtmlComplex5.py
Normal file
|
@ -0,0 +1,60 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>desc 2611-03</p>
|
||||
<p><br /></p>
|
||||
<blockquote>
|
||||
<p>identation 1</p>
|
||||
<p>identation 2</p>
|
||||
<p>identation 3</p>
|
||||
</blockquote>
|
||||
<p><br /></p>
|
||||
<ol><li>point numéroté 1</li>
|
||||
<ol><li>point numéroté 1.1</li><li>point numéroté 1.2</li></ol>
|
||||
<li>point numéroté 2</li>
|
||||
<ol><li>point numéroté 2.1</li><li>point numéroté 2.2</li><li>point numéroté 2.3</li>
|
||||
<ol><li>point numéroté 2.3.1</li><li>point numéroté 2.3.2</li></ol>
|
||||
</ol>
|
||||
<li>point numéroté 3</li></ol>
|
||||
<br />
|
||||
<ul><li>grosse lune niveau 1</li>
|
||||
<ul><li>grosse lune niveau 2</li>
|
||||
<ul><li>grosse lune niveau 3</li>
|
||||
<ul><li>grosse lune niveau 4<br /></li></ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<ul>
|
||||
<ul>
|
||||
<ul>
|
||||
<ul><li>grosse lune niveau 5<br /></li>
|
||||
<ul><li>grosse lune niveau 6<br /></li>
|
||||
<ul><li>grosse lune niveau 7</li>
|
||||
<ul><li>grosse lune niveau 8</li>
|
||||
<ul><li>grosse lune niveau 9</li>
|
||||
<ul><li>grosse lune niveau 10</li></ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<br /><br />
|
||||
<dl><dt>titre liste 1 </dt><dd>liste 1 </dd><dt>titre liste 2 </dt><dd>liste 2 </dd><dt>titre liste 3 </dt><dd>liste 3 </dd><dt>
|
||||
<div align="center"><b>texte normal<br /></b></div>
|
||||
</dt></dl>
|
||||
<ol type="I"><li>romain maj 1</li><li>romain maj 2</li></ol>
|
||||
<br />
|
||||
<ol type="i"><li>romain 1</li><li>romain 2<br /></li></ol>
|
||||
<dl>
|
||||
<dl><dt><br /></dt></dl>
|
||||
</dl>
|
||||
<ol type="A"><li>alpha maj 1<br /></li><li>alpha maj 2</li></ol>
|
||||
<br />
|
||||
<ol type="a"><li>alpha min 1</li><li>alpha min 2</li></ol>
|
||||
<br />blablabla<br />
|
||||
<dl><dt><br /></dt></dl>
|
||||
'''
|
2
appy/pod/test/contexts/XhtmlComplex6.py
Normal file
2
appy/pod/test/contexts/XhtmlComplex6.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '<div class="document">\n<p>Hallo?</p>\n</div>\n'
|
13
appy/pod/test/contexts/XhtmlComplex7.py
Normal file
13
appy/pod/test/contexts/XhtmlComplex7.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
xhtmlInput = '''
|
||||
<div class="document">
|
||||
<p>Some <strong>bold</strong> and some <em>italic</em> text.</p>
|
||||
<p>A new paragraph.</p>
|
||||
<p>A list with three items:</p>
|
||||
<ul>
|
||||
<li>the first item</li>
|
||||
<li>another item</li>
|
||||
<li>the last item</li>
|
||||
</ul>
|
||||
<p>A last paragraph.</p>
|
||||
</div>
|
||||
'''
|
9
appy/pod/test/contexts/XhtmlComplex8.py
Normal file
9
appy/pod/test/contexts/XhtmlComplex8.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<ol><li>
|
||||
<div style="text-align: justify;">Le Gouvernement adopte le projet d’arrêté modifiant l'arrêté du 9 février 1998 portant délégations de compétence et de signature aux fonctionnaires généraux et à certains autres agents des services du Gouvernement de la Communauté française - Ministère de la Communauté française.</div>
|
||||
</li><li>
|
||||
<div style="text-align: justify;">Il charge le Ministre de la Fonction publique de l'exécution de la présente décision.</div>
|
||||
</li></ol>
|
||||
<p class="pmParaKeepWithNext"> </p>
|
||||
'''
|
57
appy/pod/test/contexts/XhtmlComplexTables.py
Normal file
57
appy/pod/test/contexts/XhtmlComplexTables.py
Normal file
|
@ -0,0 +1,57 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>
|
||||
<table class="plain">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="align-right" align="right">Title column one<br /></th>
|
||||
<th>title column two</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="align-right" align="right">Hi with a <a class="generated" href="http://easi.wallonie.be">http://easi.wallonie.be</a> <br /></td>
|
||||
<td>fdff</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right" align="right"><br /></td>
|
||||
<td><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right" align="left">Some text here<br />
|
||||
<ul><li>Bullet One</li><li>Bullet Two</li>
|
||||
<ul><li>Sub-bullet A</li><li>Sub-bullet B</li>
|
||||
<ul><li>Subsubboulette<br /></li></ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>SubTable</td>
|
||||
<td>Columns 2<br /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br /></p>
|
||||
'''
|
||||
|
||||
xhtmlInput2 = '''
|
||||
<ul><li>
|
||||
<p>a</p>
|
||||
</li><li>
|
||||
<p>b</p>
|
||||
</li><li>
|
||||
<p>c</p>
|
||||
</li>
|
||||
<ul>
|
||||
<li><p>SUB</p>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
'''
|
5
appy/pod/test/contexts/XhtmlEntities.py
Normal file
5
appy/pod/test/contexts/XhtmlEntities.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Some HTML entities: é: é, è: è, Atilde: Ã.</p>
|
||||
<p>XML entities: amp: &, quote: ", apos: ', lt: <, gt: >.</p>
|
||||
<p> </p><p>Para</p>'''
|
44
appy/pod/test/contexts/XhtmlKeepWithNext.py
Normal file
44
appy/pod/test/contexts/XhtmlKeepWithNext.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# I need a class.
|
||||
class D:
|
||||
def getAt1(self):
|
||||
return '''
|
||||
<p>Notifia</p>
|
||||
<ol>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li class="podItemKeepWithNext">Keep with next, without style mapping.</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<ul><li class="pmItemKeepWithNext">This one has 'keep with next'</li>
|
||||
<li>Hello</li>
|
||||
<ol><li>aaaaaaaaaa aaaaaaaaaaaaaa</li>
|
||||
<li>aaaaaaaaaa aaaaaaaaaaaaaa</li>
|
||||
<li>aaaaaaaaaa aaaaaaaaaaaaaa</li>
|
||||
<li class="pmItemKeepWithNext">This one has 'keep with next'</li>
|
||||
</ol>
|
||||
</ul>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li>Een</li>
|
||||
<li class="pmItemKeepWithNext">This one has 'keep with next'</li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li>Un</li>
|
||||
<li>Deux</li>
|
||||
<li>Trois</li>
|
||||
<li>Quatre</li>
|
||||
<li class="pmItemKeepWithNext">VCinq (this one has 'keep with next')</li>
|
||||
<li class="pmItemKeepWithNext">Six (this one has 'keep with next')</li>
|
||||
<li class="pmItemKeepWithNext">Sept (this one has 'keep with next')</li>
|
||||
</ul>'''
|
||||
dummy = D()
|
6
appy/pod/test/contexts/XhtmlNominal.py
Normal file
6
appy/pod/test/contexts/XhtmlNominal.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# I need a class.
|
||||
class D:
|
||||
def getAt1(self):
|
||||
return '\n<p>Test1<br /></p>\n'
|
||||
dummy = D()
|
12
appy/pod/test/contexts/XhtmlStylesErrors.py
Normal file
12
appy/pod/test/contexts/XhtmlStylesErrors.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Hello.</p>
|
||||
<h2>Heading One</h2>
|
||||
Blabla.<br />
|
||||
<h3>SubHeading then.</h3>
|
||||
Another blabla.<br /><br /><br /> '''
|
||||
# I need a class.
|
||||
class D:
|
||||
def getAt1(self):
|
||||
return xhtmlInput
|
||||
dummy = D()
|
12
appy/pod/test/contexts/XhtmlStylesMapping.py
Normal file
12
appy/pod/test/contexts/XhtmlStylesMapping.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Hello.</p>
|
||||
<h2>Heading One</h2>
|
||||
Blabla.<br />
|
||||
<h3>SubHeading then.</h3>
|
||||
Another blabla.<br /><br /><br /> '''
|
||||
# I need a class.
|
||||
class D:
|
||||
def getAt1(self):
|
||||
return xhtmlInput
|
||||
dummy = D()
|
35
appy/pod/test/contexts/XhtmlTables.py
Normal file
35
appy/pod/test/contexts/XhtmlTables.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p>Table test.</p>
|
||||
<p>
|
||||
<table class="plain">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Table 1 <br /></td>
|
||||
<td colspan="2">aaaaa<br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zzz <br /></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>SubTableA</td>
|
||||
<td>SubTableB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SubTableC</td>
|
||||
<td>SubTableD</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><b>Hello</b> blabla<table><tr><td>SubTableOneRowOneColumn</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Within a <b>para</b>graph</p></td>
|
||||
<td><b>Hello</b> non bold</td>
|
||||
<td>Hello <b>bold</b> not bold</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
<br />'''
|
16
appy/pod/test/contexts/XhtmlWithStyle.py
Normal file
16
appy/pod/test/contexts/XhtmlWithStyle.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
xhtmlInput = '''
|
||||
<p><meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" /><title></title><meta name="GENERATOR" content="OpenOffice.org 3.0 (Win32)" /><style type="text/css">
|
||||
<!--
|
||||
@page { margin: 2cm }
|
||||
P { margin-bottom: 0.21cm }
|
||||
-->
|
||||
</style>
|
||||
<p>concepteurs de normes : membres des
|
||||
cabinets ministériels et les administrations.</p>
|
||||
<p><br /><br /></p>
|
||||
<p>Laurent, membre du cabinet du Ministre
|
||||
de l'énergie, doit rédiger un arrêté du Gouvernement wallon
|
||||
relatif à l'octroi d'une prime à l'isolation. Il peut télécharger
|
||||
le canevas typ</p>
|
||||
</p>'''
|
18
appy/pod/test/contexts/__init__.py
Normal file
18
appy/pod/test/contexts/__init__.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Here I define some classes that will be used for defining objects in several
|
||||
# contexts.
|
||||
class Person:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.lastName = '%s last name' % name
|
||||
self.firstName = '%s first name' % name
|
||||
self.address = '%s address' % name
|
||||
|
||||
class Group:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
if name == 'group1':
|
||||
self.persons = [Person('P1'), Person('P2'), Person('P3')]
|
||||
elif name == 'group2':
|
||||
self.persons = [Person('RA'), Person('RB')]
|
||||
else:
|
||||
self.persons = []
|
Loading…
Add table
Add a link
Reference in a new issue