Skip to content

Commit

Permalink
more fixes to mock of GRID_LRT.SafePopen
Browse files Browse the repository at this point in the history
  • Loading branch information
apmechev committed Oct 24, 2019
1 parent 2e9ec49 commit 4157bc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GRID_LRT/tests/test_submit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from GRID_LRT.application import submit
import GRID_LRT
import os
import glob
import unittest
Expand All @@ -7,7 +8,7 @@


def mocked_import(*args, **kwargs):
with mock.patch.object(subprocess, 'Popen') as mocked_popen:
with mock.patch.object(GRID_LRT, 'SafePopen') as mocked_popen:
mocked_popen.return_value.returncode = 0
mocked_popen.return_value.communicate.return_value = ("the file really exists".encode(), "".encode())
launcher = submit.JdlLauncher(*args, **kwargs)
Expand Down

0 comments on commit 4157bc0

Please sign in to comment.