diff options
Diffstat (limited to 'test/test_pyg.py')
-rwxr-xr-x | test/test_pyg.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_pyg.py b/test/test_pyg.py index 4c1c1c0..e6b8fca 100755 --- a/test/test_pyg.py +++ b/test/test_pyg.py @@ -28,9 +28,10 @@ one line test def test_m2n(self): with open('examples/mail') as in_mail: - pid = subprocess.Popen(['./pygm2n', '-Tv', '-n', 'pyg.test'], + pid = subprocess.Popen(['python', 'pygm2n', '-Tv', '-n', 'pyg.test'], stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, + universal_newlines=True) out, _ = pid.communicate(in_mail.read()) self.assertEqual(out, self.expected_output) @@ -58,11 +59,12 @@ Resent-Sender: sender@example.com def test_n2m(self): with open('examples/articletest.accepted') as in_mail: - pid = subprocess.Popen(['./pygn2m', '-Tvt', 'test@example.com', + pid = subprocess.Popen(['python', 'pygn2m', '-Tvt', 'test@example.com', '-s', 'sender@example.com', '-w', 'examples/whitelist.example'], stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, + universal_newlines=True) in_message = in_mail.read().replace('pyg@pyg.server.tld', 'kame@inwind.it') out, err = pid.communicate(in_message) |