author | Aurelien Campeas <aurelien.campeas@logilab.fr> |
Wed, 27 May 2009 17:08:30 +0200 | |
branch | stable |
changeset 1972 | 2d015f8fafae |
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() |