diff options
Diffstat (limited to 'test/test_pyg.py')
-rwxr-xr-x | test/test_pyg.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/test_pyg.py b/test/test_pyg.py index 240228b..4c1c1c0 100755 --- a/test/test_pyg.py +++ b/test/test_pyg.py @@ -1,15 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -import mail2news -import os -import os.path import re import subprocess -import sys -import test import unittest +import mail2news + class TestM2N(unittest.TestCase): expected_output = """Newsgroups: pyg.test @@ -38,6 +35,7 @@ one line test self.assertEqual(out, self.expected_output) +# @unittest.skip('not ready') class TestN2M(unittest.TestCase): expected_output = """Received: from GATEWAY by mitmanek.ceplovi.cz with pyg for <test@example.com> ; Mon Dec 15 17:13:30 2014 (CEST) @@ -59,15 +57,12 @@ Resent-Sender: sender@example.com """ % (mail2news.VERSION, mail2news.DESC) def test_n2m(self): - env = os.environ - env['PYTHONPATH'] = ":".join(sys.path) - with open('examples/articletest.accepted') as in_mail: pid = subprocess.Popen(['./pygn2m', '-Tvt', 'test@example.com', '-s', 'sender@example.com', '-w', 'examples/whitelist.example'], stdin=subprocess.PIPE, - stdout=subprocess.PIPE, env=env) + stdout=subprocess.PIPE) in_message = in_mail.read().replace('pyg@pyg.server.tld', 'kame@inwind.it') out, err = pid.communicate(in_message) |