def test_patch_idempotence(self): key = 'test/patch/idempotence' patch() patch() self.c.kv.get(key) assert self.spans assert isinstance(self.c.kv.get, BoundFunctionWrapper) unpatch() self.reset() self.c.kv.get(key) assert not self.spans assert not isinstance(self.c.kv.get, BoundFunctionWrapper)
def tearDown(self): unpatch() super(TestConsulPatch, self).tearDown()