Exemplo n.º 1
0
 def testGetAll(self):
     MacroCache.put("$a","a")
     MacroCache.put("$b","b")
     assert(len(MacroCache.getAll()) == 2)
     assert(MacroCache.get("$a") == "a")
     assert(MacroCache.get("$b") == "b")
     assert(MacroCache.get("$c") == None)
Exemplo n.º 2
0
 def testPutGet(self):
     MacroCache.put("$x","123")
     assert(MacroCache.get("$x") == "123")
Exemplo n.º 3
0
 def testClear(self):
     MacroCache.put("$x","x")
     assert(MacroCache.get("$x") == "x")
     MacroCache.clear()
     assert(MacroCache.get("$x") == None)
Exemplo n.º 4
0
 def testPopulate(self):
     MacroCache.populate("src/tests/macros/")
     assert(MacroCache.get("$a")     == "a")
     assert(MacroCache.get("$b")     == "b")
     assert(MacroCache.get("$c.d")   == "d")
     assert(MacroCache.get("$c.e.a") == "f")