@@ 52-64 (lines=13) @@ | ||
49 | headers={'Accept-encoding': 'identity'}) |
|
50 | return ret |
|
51 | ||
52 | def test_000_start_server(self): |
|
53 | """Start the Glances Web Server.""" |
|
54 | global pid |
|
55 | ||
56 | print('INFO: [TEST_000] Start the Glances Web Server') |
|
57 | cmdline = "python -m glances -B localhost -w -p %s" % SERVER_PORT |
|
58 | print("Run the Glances Web Server on port %s" % SERVER_PORT) |
|
59 | args = shlex.split(cmdline) |
|
60 | pid = subprocess.Popen(args) |
|
61 | print("Please wait 5 seconds...") |
|
62 | time.sleep(5) |
|
63 | ||
64 | self.assertTrue(pid is not None) |
|
65 | ||
66 | def test_001_all(self): |
|
67 | """All.""" |
@@ 41-53 (lines=13) @@ | ||
38 | """The function is called *every time* before test_*.""" |
|
39 | print('\n' + '=' * 78) |
|
40 | ||
41 | def test_000_start_server(self): |
|
42 | """Start the Glances Web Server.""" |
|
43 | global pid |
|
44 | ||
45 | print('INFO: [TEST_000] Start the Glances Web Server') |
|
46 | cmdline = "python -m glances -B localhost -s -p %s" % SERVER_PORT |
|
47 | print("Run the Glances Server on port %s" % SERVER_PORT) |
|
48 | args = shlex.split(cmdline) |
|
49 | pid = subprocess.Popen(args) |
|
50 | print("Please wait...") |
|
51 | time.sleep(1) |
|
52 | ||
53 | self.assertTrue(pid is not None) |
|
54 | ||
55 | def test_001_all(self): |
|
56 | """All.""" |