summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-07-06 20:44:54 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2016-07-06 20:45:02 +0200
commit794911534ce8121acd7dba89cc53c20fe088e5bd (patch)
tree78dd0bf89b5880717e7b6a7f80414a305c8251f8 /tests
parent59ebc76b97ed91f18b88e1eedcc66bcc6e0331d5 (diff)
fix pep8/flakes
Diffstat (limited to 'tests')
-rw-r--r--tests/skip_test_holes.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/skip_test_holes.py b/tests/skip_test_holes.py
index 92ac60e..4261087 100644
--- a/tests/skip_test_holes.py
+++ b/tests/skip_test_holes.py
@@ -29,7 +29,7 @@ class MemoryHoleTest(unittest.TestCase):
expected = _load_expected_msg(sampleid)
msg = memoryhole.protect_message(
orig, self.gpg, boundary=boundary,
- sign_digest_algo='SHA256', passphrase='_' + keyowner + '_')
+ sign_digest_algo='SHA256', passphrase='_' + keyowner + '_')
# TODO -- how to compare messages??
self.assertEqual(dict(msg), dict(expected))
@@ -42,23 +42,28 @@ def _load_key(keyname, gpg):
keydata = keyf.read()
gpg.import_keys(keydata)
+
def _get_raw_message(identifier):
path = os.path.join(corpus, 'sample.' + identifier + '.eml')
return _parse(_load_file(path))
+
def _load_expected_msg(identifier):
path = os.path.join(corpus, 'expected.' + identifier + '.eml')
return _parse(_load_file(path))
+
def _load_file(path):
with open(path) as f:
raw = f.read()
return raw
+
def _parse(raw):
parser = Parser()
return parser.parsestr(raw)
+
def _boundary_factory(start):
counter = {'value': ord(start)}