author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 26 May 2009 19:46:08 +0200 | |
branch | stable |
changeset 1948 | 887ed691c635 |
parent 1802 | d628defebc17 |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
import sys |
2 |
import os |
|
3 |
from cStringIO import StringIO |
|
4 |
from logilab.common.testlib import TestCase, unittest_main |
|
5 |
||
6 |
if os.environ.get('APYCOT_ROOT'): |
|
7 |
root = os.environ['APYCOT_ROOT'] |
|
8 |
CUBES_DIR = '%s/local/share/cubicweb/cubes/' % root |
|
9 |
os.environ['CW_CUBES'] = CUBES_DIR |
|
10 |
REGISTRY_DIR = '%s/etc/cubicweb.d/' % root |
|
11 |
os.environ['CW_REGISTRY_DIR'] = REGISTRY_DIR |
|
12 |
||
13 |
from cubicweb.cwconfig import CubicWebConfiguration |
|
14 |
CubicWebConfiguration.load_cwctl_plugins() |
|
15 |
||
16 |
class CubicWebCtlTC(TestCase): |
|
17 |
def setUp(self): |
|
18 |
self.stream = StringIO() |
|
19 |
sys.stdout = self.stream |
|
20 |
def tearDown(self): |
|
21 |
sys.stdout = sys.__stdout__ |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
22 |
|
0 | 23 |
def test_list(self): |
24 |
from cubicweb.cwctl import ListCommand |
|
25 |
ListCommand().run([]) |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
26 |
|
0 | 27 |
if __name__ == '__main__': |
28 |
unittest_main() |