Skip to content

Commit 4546eaf

Browse files
committed
Add test for pifpaf list command
This adds a test that the pifpaf list command exites successfully and contains atleast one driver name.
1 parent 2b9face commit 4546eaf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pifpaf/tests/test_cli.py

+8
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ def test_global_urls_variable_old_format(self):
147147
b"\"memcached://localhost:11217;memcached://localhost:11218\";",
148148
env[b"export PIFPAF_URLS"])
149149

150+
def test_list_command(self):
151+
c = subprocess.Popen(["pifpaf", "list"],
152+
bufsize=0,
153+
stdout=subprocess.PIPE)
154+
(stdout, stderr) = c.communicate()
155+
self.assertEqual(0, c.wait())
156+
self.assertIn(b'memcached', stdout)
157+
150158
def test_non_existing_command(self):
151159
# Keep PATH to just the one set by tox to run pifpaf
152160
self.useFixture(fixtures.EnvironmentVariable(

0 commit comments

Comments
 (0)