split tests into multiple files, and fixed tests to work with refactor

This commit is contained in:
Micah Lee 2014-08-26 18:38:46 -07:00
parent 54a37ee28e
commit a32ca2f7a9
5 changed files with 103 additions and 83 deletions

21
test/test_helpers.py Normal file
View file

@ -0,0 +1,21 @@
import tempfile
class MockSubprocess():
def __init__(self):
self.last_call = None
def call(self, args):
self.last_call = args
def last_call_args(self):
return self.last_call
def write_tempfile(text):
tempdir = tempfile.mkdtemp()
path = tempdir + "/test-file.txt"
with open(path, "w") as f:
f.write(text)
f.close()
return path