Fix test_gpg_binary_version_str() to detect correct output from 'gpg --version'.
parent
0b6b4ed2ff
commit
be303125d1
|
@ -125,10 +125,15 @@ class GPGTestCase(unittest.TestCase):
|
||||||
def test_gpg_binary_version_str(self):
|
def test_gpg_binary_version_str(self):
|
||||||
"That that 'gpg --version' returns the expected output"
|
"That that 'gpg --version' returns the expected output"
|
||||||
proc = self.gpg._open_subprocess(['--version'])
|
proc = self.gpg._open_subprocess(['--version'])
|
||||||
result = io.StringIO()
|
result = ""
|
||||||
self.gpg._collect_output(proc, result, stdin=proc.stdin)
|
self.gpg._collect_output(proc, result, stdin=proc.stdin)
|
||||||
result.fpr
|
expected = """gpg (GnuPG) 1.4.12
|
||||||
self.assertGreater((result.find("AES")), 0)
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||||
|
This is free software: you are free to change and redistribute it.
|
||||||
|
There is NO WARRANTY, to the extent permit"""
|
||||||
|
logger.debug("'gpg --version' returned output:n%s" % result)
|
||||||
|
self.assertEqual(result, expected)
|
||||||
|
|
||||||
def test_gpg_binary_not_abs(self):
|
def test_gpg_binary_not_abs(self):
|
||||||
"Test that a non-absolute path to gpg results in a full path"
|
"Test that a non-absolute path to gpg results in a full path"
|
||||||
|
|
Loading…
Reference in New Issue