Pārlūkot izejas kodu

Permit to reset hapic context

Bastien Sevajol 7 gadus atpakaļ
vecāks
revīzija
b3b215130c
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      hapic/hapic.py

+ 3 - 0
hapic/hapic.py Parādīt failu

78
         assert not self._context
78
         assert not self._context
79
         self._context = context
79
         self._context = context
80
 
80
 
81
+    def reset_context(self) -> None:
82
+        self._context = None
83
+
81
     def with_api_doc(self):
84
     def with_api_doc(self):
82
         def decorator(func):
85
         def decorator(func):
83
             @functools.wraps(func)
86
             @functools.wraps(func)