equal
deleted
inserted
replaced
22 import unittest |
22 import unittest |
23 |
23 |
24 from six import PY2 |
24 from six import PY2 |
25 |
25 |
26 from cubicweb.cwconfig import CubicWebConfiguration |
26 from cubicweb.cwconfig import CubicWebConfiguration |
|
27 from cubicweb.cwctl import ListCommand |
27 from cubicweb.devtools.testlib import CubicWebTC |
28 from cubicweb.devtools.testlib import CubicWebTC |
28 from cubicweb.server.migractions import ServerMigrationHelper |
29 from cubicweb.server.migractions import ServerMigrationHelper |
29 |
30 |
30 |
31 |
31 class CubicWebCtlTC(unittest.TestCase): |
32 class CubicWebCtlTC(unittest.TestCase): |
36 |
37 |
37 def tearDown(self): |
38 def tearDown(self): |
38 sys.stdout = sys.__stdout__ |
39 sys.stdout = sys.__stdout__ |
39 |
40 |
40 def test_list(self): |
41 def test_list(self): |
41 from cubicweb.cwctl import ListCommand |
|
42 ListCommand(None).run([]) |
42 ListCommand(None).run([]) |
|
43 |
|
44 def test_list_configurations(self): |
|
45 ListCommand(None).run(['configurations']) |
|
46 configs = [l[2:].strip() for l in self.stream.getvalue().splitlines() |
|
47 if l.startswith('* ')] |
|
48 self.assertIn('all-in-one', configs) |
|
49 self.assertIn('pyramid', configs) |
43 |
50 |
44 |
51 |
45 class CubicWebShellTC(CubicWebTC): |
52 class CubicWebShellTC(CubicWebTC): |
46 |
53 |
47 def test_process_script_args_context(self): |
54 def test_process_script_args_context(self): |