def __init__(self, namespace, max_entries=1000, client=None): if client is None: client = redis.Redis() self._client = client self.namespace = namespace self.max_entries = max_entries script_path = LuaScript.script_path(self.script_name) self._script = LuaScript(script_path, self._client)
def test_script_path_classmethod(self): default_dir = os.path.dirname(scripting_module.__file__) path = LuaScript.script_path('example') self.assertEquals(path, os.path.join(default_dir, 'scripts', 'example.lua'))