updated imports in tests

This commit is contained in:
ilvalle
2016-06-02 14:28:21 +02:00
parent 01bab81432
commit a1fd92b7f8
45 changed files with 182 additions and 169 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ Generates names for cache and session files
--------------------------------------------
"""
import os
from gluon._compat import builtin
def generate(filename, depth=2, base=512):
if os.path.sep in filename:
@@ -62,4 +62,4 @@ def open(filename, mode="r", path=None):
fullfilename = os.path.join(path, generate(filename))
if mode.startswith('w') and not os.path.exists(os.path.dirname(fullfilename)):
os.makedirs(os.path.dirname(fullfilename))
return file(fullfilename, mode)
return builtin.open(fullfilename, mode)