From ac8d2949a2310d36e334c8de6f0ac925e05fcd98 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 4 Apr 2022 17:30:41 +0200 Subject: Fix qute-lastpass tests --- tests/unit/misc/userscripts/test_qute_lastpass.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/misc/userscripts/test_qute_lastpass.py b/tests/unit/misc/userscripts/test_qute_lastpass.py index 24272a048..ebd9a7591 100644 --- a/tests/unit/misc/userscripts/test_qute_lastpass.py +++ b/tests/unit/misc/userscripts/test_qute_lastpass.py @@ -122,7 +122,7 @@ class TestQuteLastPassComponents: subprocess_mock.assert_called_once_with( ['lpass', 'show', '-x', '-j', '-G', '\\bexample\\.com'], - stdout=ANY, stderr=ANY) + capture_output=True) def test_pass_returns_candidates(self, subprocess_mock): """Test if pass_ returns expected lpass site entry.""" @@ -263,7 +263,7 @@ class TestQuteLastPassMain: subprocess_mock.assert_has_calls([ call(['lpass', 'show', '-x', '-j', '-G', '\\bwww\\.example\\.com'], - stdout=ANY, stderr=ANY), + capture_output=True), call(['rofi', '-dmenu'], input=b'12345 | www.example.com | https://www.example.com | fake@fake.com\n23456 | Sites/www.example.com | https://www.example.com | john.doe@fake.com', stdout=ANY) @@ -328,13 +328,13 @@ class TestQuteLastPassMain: subprocess_mock.assert_has_calls([ call(['lpass', 'show', '-x', '-j', '-G', '\\bwww\\.example\\.com'], - stdout=ANY, stderr=ANY), + capture_output=True), call(['lpass', 'show', '-x', '-j', '-G', '\\bexample\\.com'], - stdout=ANY, stderr=ANY), + capture_output=True), call(['lpass', 'show', '-x', '-j', '-G', '\\bwwwexample'], - stdout=ANY, stderr=ANY), + capture_output=True), call(['lpass', 'show', '-x', '-j', '-G', '\\bexample'], - stdout=ANY, stderr=ANY), + capture_output=True), call(['rofi', '-dmenu'], input=b'12345 | www.example.com | https://www.example.com | fake@fake.com\n23456 | Sites/www.example.com | https://www.example.com | john.doe@fake.com\n345 | example.com | https://example.com | joe.doe@fake.com\n456 | Sites/example.com | http://example.com | jane.doe@fake.com', stdout=ANY) -- cgit v1.2.3-54-g00ecf