From 1400a27508081c94ee649867edffbcf383945402 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 3 Aug 2016 18:14:45 +0200 Subject: [PATCH] more tests for OpenFileDownloadTarget --- tests/unit/utils/usertypes/test_downloadtarget.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/unit/utils/usertypes/test_downloadtarget.py b/tests/unit/utils/usertypes/test_downloadtarget.py index e89401144..4da2e7a81 100644 --- a/tests/unit/utils/usertypes/test_downloadtarget.py +++ b/tests/unit/utils/usertypes/test_downloadtarget.py @@ -41,8 +41,13 @@ def test_fileobj(): def test_openfile(): - # Just make sure no error is raised, that should be enough. - usertypes.OpenFileDownloadTarget() + target = usertypes.OpenFileDownloadTarget() + assert target.cmdline is None + + +def test_openfile_custom_command(): + target = usertypes.OpenFileDownloadTarget('echo') + assert target.cmdline == 'echo' @pytest.mark.parametrize('obj', [