def tearDown(self):
# Reset cached cache
hookenv.cache = {}
python类cache()的实例源码
def tearDown(self):
# Reset @cached cache
hookenv.cache = {}
def tearDown(self):
# Reset cached cache
hookenv.cache = {}
def tearDown(self):
# Reset @cached cache
hookenv.cache = {}
test_neutron_ovs_utils.py 文件源码
项目:charm-neutron-openvswitch
作者: openstack
项目源码
文件源码
阅读 23
收藏 0
点赞 0
评论 0
def tearDown(self):
# Reset cached cache
hookenv.cache = {}
def tearDown(self):
# Reset @cached cache
hookenv.cache = {}
test_neutron_plumgrid_plugin_utils.py 文件源码
项目:charm-neutron-api-plumgrid
作者: openstack
项目源码
文件源码
阅读 21
收藏 0
点赞 0
评论 0
def tearDown(self):
# Reset cached cache
hookenv.cache = {}
def tearDown(self):
# Reset cached cache
hookenv.cache = {}
def tearDown(self):
# Reset cached cache
hookenv.cache = {}
def _clean_globals():
hookenv.cache.clear()
del hookenv._atstart[:]
del hookenv._atexit[:]
def test_relation_set_flushes_local_unit_cache(self, check_output,
check_call, local_unit):
check_output.return_value = json.dumps('BAR').encode('UTF-8')
local_unit.return_value = 'baz_unit'
hookenv.relation_get(attribute='baz_scope', unit='baz_unit')
hookenv.relation_get(attribute='bar_scope')
self.assertTrue(len(hookenv.cache) == 2)
check_output.return_value = ""
hookenv.relation_set(baz_scope='hello')
# relation_set should flush any entries for local_unit
self.assertTrue(len(hookenv.cache) == 1)