author | Aurelien Campeas <aurelien.campeas@logilab.fr> |
Thu, 19 Nov 2009 19:48:41 +0100 | |
branch | stable |
changeset 3884 | b0ff58d929a4 |
parent 2445 | 6f065b366d14 |
child 4212 | ab6573088b4a |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
7 |
""" |
0 | 8 |
import sys |
9 |
import os |
|
10 |
from cStringIO import StringIO |
|
11 |
from logilab.common.testlib import TestCase, unittest_main |
|
12 |
||
13 |
if os.environ.get('APYCOT_ROOT'): |
|
14 |
root = os.environ['APYCOT_ROOT'] |
|
15 |
CUBES_DIR = '%s/local/share/cubicweb/cubes/' % root |
|
2445
6f065b366d14
rename environment variables
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
16 |
os.environ['CW_CUBES_PATH'] = CUBES_DIR |
0 | 17 |
REGISTRY_DIR = '%s/etc/cubicweb.d/' % root |
2445
6f065b366d14
rename environment variables
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
18 |
os.environ['CW_INSTANCES_DIR'] = REGISTRY_DIR |
0 | 19 |
|
20 |
from cubicweb.cwconfig import CubicWebConfiguration |
|
21 |
CubicWebConfiguration.load_cwctl_plugins() |
|
22 |
||
23 |
class CubicWebCtlTC(TestCase): |
|
24 |
def setUp(self): |
|
25 |
self.stream = StringIO() |
|
26 |
sys.stdout = self.stream |
|
27 |
def tearDown(self): |
|
28 |
sys.stdout = sys.__stdout__ |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
29 |
|
0 | 30 |
def test_list(self): |
31 |
from cubicweb.cwctl import ListCommand |
|
32 |
ListCommand().run([]) |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
33 |
|
0 | 34 |
if __name__ == '__main__': |
35 |
unittest_main() |