diff --git a/test_gnupg.py b/test_gnupg.py index 11a7af5..470d552 100644 --- a/test_gnupg.py +++ b/test_gnupg.py @@ -125,10 +125,15 @@ class GPGTestCase(unittest.TestCase): def test_gpg_binary_version_str(self): "That that 'gpg --version' returns the expected output" proc = self.gpg._open_subprocess(['--version']) - result = io.StringIO() + result = "" self.gpg._collect_output(proc, result, stdin=proc.stdin) - result.fpr - self.assertGreater((result.find("AES")), 0) + expected = """gpg (GnuPG) 1.4.12 +Copyright (C) 2012 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +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): "Test that a non-absolute path to gpg results in a full path"