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