Skip to content

Commit

Permalink
improved js testcases a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Obrist committed Jan 18, 2011
1 parent e046e3a commit 18dd397
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cms/test/js_testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ def _get_file_path(self, *bits):
return os.path.join(MEDIADIR, *bits)

def _run_javascript(self, files, snippet):
code = ""
ctx = self._get_context()
for filename in files:
with open(filename, 'r') as fobj:
code += fobj.read()
code += snippet
ctx = self._get_context()
return ctx.execute(code)
lib = fobj.read()
ctx.execute(lib)
return ctx.execute(snippet)

0 comments on commit 18dd397

Please sign in to comment.