Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improved js testcases a bit

  • Loading branch information...
commit 18dd3978678db8f6c74c008e61007771a88abcae 1 parent e046e3a
@ojii ojii authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 cms/test/js_testcases.py
View
9 cms/test/js_testcases.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.