File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -95,3 +95,11 @@ def isTmpError(self):
9595 Check if current API response represents a temporary error case (4xx)
9696 """
9797 return self .__hash ["CODE" ][0 ] == "4"
98+
99+ def isPending (self ):
100+ """
101+ Check if current operation is returned as pending
102+ """
103+ if 'PENDING' in self .__hash :
104+ return self .__hash ["PENDING" ] == "1"
105+ return False
Original file line number Diff line number Diff line change 1- Subproject commit 7205428bfb9ab9f8dbcaeefe23ce5fe426bb06b9
1+ Subproject commit 40826171fc78ea0bc11662624226464d06cee18c
Original file line number Diff line number Diff line change @@ -25,3 +25,11 @@ def test_responsetemplatemethods():
2525 assert tpl .getRuntime () == 0.00
2626 # [in api response]
2727 assert tpl2 .getRuntime () == 0.12
28+
29+ # #.isPending
30+ # [not in api response]
31+ assert tpl .isPending () == False
32+ # [in api response]
33+ tpl2 = ResponseTemplate (
34+ '[RESPONSE]\r \n code=423\r \n description=Empty API response\r \n pending=1\r \n EOF\r \n ' )
35+ assert tpl2 .isPending ()
You can’t perform that action at this time.
0 commit comments