Skip to content

Commit 07fa39a

Browse files
committed
Clarifies test1.py
git-svn-id: svn://cherokee-project.com/CTK/trunk@4219 5dc97367-97f1-0310-9951-d761b3857238
1 parent 26d3ce8 commit 07fa39a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test1.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import CTK
2+
import time
23

34
def error(x):
45
raise Exception("Bad dog!!!!")
@@ -16,15 +17,18 @@ def ok(x):
1617
OPTIONS = [('one','uno'), ('two','dos'), ('three', 'tres')]
1718

1819
def apply():
20+
if CTK.post['server!tri']:
21+
time.sleep(2)
22+
1923
return {'ret': "ok"}
2024

2125
class default:
2226
def __init__ (self):
2327
a = CTK.PropsAuto ('/apply')
24-
a.Add ('Name', CTK.TextField({'name': "server!uno"}), 'Example 1')
25-
a.Add ('Surname', CTK.TextField({'name': "server!dos"}), 'Lalala')
26-
a.Add ('Nick', CTK.TextField({'name': "server!tri"}), 'Oh uh ah!')
27-
a.Add ('Active', CTK.Checkbox ({'name': "server!active", 'checked':1}), 'Nuevo')
28+
a.Add ('To upcase', CTK.TextField({'name': "server!uno"}), 'Converts the content of the field to upcase')
29+
a.Add ('Shows error', CTK.TextField({'name': "server!dos"}), 'It shows an error, it does not matter what you write')
30+
a.Add ('Delay 2secs', CTK.TextField({'name': "server!tri"}), 'It delays response for 2 seconds, so the submitting message is shown')
31+
a.Add ('Active', CTK.Checkbox ({'name': "server!active", 'checked':1}), 'It\'s just a plain checkbox. Nothing to see here')
2832

2933
b = CTK.PropsAuto ('/apply')
3034
b.Add ('Elige', CTK.Combobox ({'name': "server!elec", 'selected': "two"}, OPTIONS), 'la lista')

0 commit comments

Comments
 (0)