Fix new pylint issues in functional tests 56/102256/1
authorGilles Thouenon <gilles.thouenon@orange.com>
Wed, 31 Aug 2022 09:41:35 +0000 (11:41 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Thu, 1 Sep 2022 08:47:00 +0000 (10:47 +0200)
- add timeout in requests.request methods
- remove useless disable pylint warning

Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I2acd0f10b458fe8f7ee1be65644880fd0b41d943

tests/transportpce_tests/1.2.1/test02_topo_portmapping.py
tests/transportpce_tests/common/test_utils.py
tests/transportpce_tests/common/test_utils_rfc8040.py
tests/transportpce_tests/hybrid/test01_device_change_notifications.py
tests/transportpce_tests/hybrid/test03_autonomous_reroute.py
tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py
tests/transportpce_tests/with_docker/test02_nbinotifications.py
tests/transportpce_tests/with_docker/test03_tapi_nbinotifications.py

index 1f902c3e734156edc490362fa9fc208df3f12b64..03a02307a68efa97fa2779e45086e51cc2c198df 100644 (file)
@@ -12,7 +12,6 @@
 # pylint: disable=no-member
 # pylint: disable=too-many-public-methods
 # a pylint false positive due to unittest
-# pylint: disable=no-self-use
 
 import time
 import unittest
index 65ca5e212677a6346c605a81175c07d53c2d1b53..4b2b7f1d01c76d2730376038716b17f8aad875b3 100644 (file)
@@ -69,6 +69,8 @@ URL_TAPI_GET_NOTIFICATION_LIST = "{}/operations/tapi-notification:get-notificati
 TYPE_APPLICATION_JSON = {'Content-Type': 'application/json', 'Accept': 'application/json'}
 TYPE_APPLICATION_XML = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
 
+REQUEST_TIMEOUT = 10
+
 CODE_SHOULD_BE_200 = 'Http status code should be 200'
 CODE_SHOULD_BE_201 = 'Http status code should be 201'
 
@@ -170,7 +172,8 @@ def get_request(url):
     return requests.request(
         "GET", url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def post_request(url, data):
@@ -180,12 +183,14 @@ def post_request(url, data):
             "POST", url.format(RESTCONF_BASE_URL),
             data=json.dumps(data),
             headers=TYPE_APPLICATION_JSON,
-            auth=(ODL_LOGIN, ODL_PWD))
+            auth=(ODL_LOGIN, ODL_PWD),
+            timeout=REQUEST_TIMEOUT)
 
     return requests.request(
         "POST", url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def post_xmlrequest(url, data):
@@ -194,7 +199,8 @@ def post_xmlrequest(url, data):
             "POST", url.format(RESTCONF_BASE_URL),
             data=data,
             headers=TYPE_APPLICATION_XML,
-            auth=(ODL_LOGIN, ODL_PWD))
+            auth=(ODL_LOGIN, ODL_PWD),
+            timeout=REQUEST_TIMEOUT)
     return None
 
 
@@ -203,7 +209,8 @@ def put_request(url, data):
         "PUT", url.format(RESTCONF_BASE_URL),
         data=json.dumps(data),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def put_xmlrequest(url, data):
@@ -211,7 +218,8 @@ def put_xmlrequest(url, data):
         "PUT", url.format(RESTCONF_BASE_URL),
         data=data,
         headers=TYPE_APPLICATION_XML,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def put_jsonrequest(url, data):
@@ -219,7 +227,8 @@ def put_jsonrequest(url, data):
         "PUT", url.format(RESTCONF_BASE_URL),
         data=data,
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def rawput_request(url, data):
@@ -227,7 +236,8 @@ def rawput_request(url, data):
         "PUT", url.format(RESTCONF_BASE_URL),
         data=data,
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def rawpost_request(url, data):
@@ -235,14 +245,16 @@ def rawpost_request(url, data):
         "POST", url.format(RESTCONF_BASE_URL),
         data=data,
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def delete_request(url):
     return requests.request(
         "DELETE", url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def mount_device(node_id, sim):
index 9f0c3371022a9f3506105304795576914f437b2c..bcbe35ef467b68da1d6e7a524b2046db5d6228fd 100644 (file)
@@ -40,6 +40,8 @@ NODES_PWD = 'admin'
 TYPE_APPLICATION_JSON = {'Content-Type': 'application/json', 'Accept': 'application/json'}
 TYPE_APPLICATION_XML = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
 
+REQUEST_TIMEOUT = 10
+
 CODE_SHOULD_BE_200 = 'Http status code should be 200'
 CODE_SHOULD_BE_201 = 'Http status code should be 201'
 
@@ -87,7 +89,8 @@ def get_request(url):
     return requests.request(
         'GET', url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def put_request(url, data):
@@ -95,14 +98,16 @@ def put_request(url, data):
         'PUT', url.format(RESTCONF_BASE_URL),
         data=json.dumps(data),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def delete_request(url):
     return requests.request(
         'DELETE', url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 
 def post_request(url, data):
@@ -111,11 +116,13 @@ def post_request(url, data):
             "POST", url.format(RESTCONF_BASE_URL),
             data=json.dumps(data),
             headers=TYPE_APPLICATION_JSON,
-            auth=(ODL_LOGIN, ODL_PWD))
+            auth=(ODL_LOGIN, ODL_PWD),
+            timeout=REQUEST_TIMEOUT)
     return requests.request(
         "POST", url.format(RESTCONF_BASE_URL),
         headers=TYPE_APPLICATION_JSON,
-        auth=(ODL_LOGIN, ODL_PWD))
+        auth=(ODL_LOGIN, ODL_PWD),
+        timeout=REQUEST_TIMEOUT)
 
 #
 # Process management
index 238e8081e55affcfa05fee8097ccd95bab884f24..489ca60fb325f5aa5243ec7d2d2c3ab4fb206e3a 100644 (file)
@@ -208,7 +208,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8130/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -281,7 +282,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8130/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -328,7 +330,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -394,7 +397,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -418,7 +422,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -484,7 +489,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -506,7 +512,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8154/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -570,7 +577,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8154/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -594,7 +602,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
index 36997c808fdee46ee6c0b7e07b7df8124d2013a3..a456d8a1df1513a11884313fa4926a286f0bd986 100644 (file)
@@ -1064,7 +1064,8 @@ class TransportPCEtesting(unittest.TestCase):
         }
         response = requests.request("POST", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         self.assertEqual(response.json()['output']['status-message'], "The PMs has been successfully set !")
         time.sleep(self.WAITING * 2)
@@ -1141,7 +1142,8 @@ class TransportPCEtesting(unittest.TestCase):
         }
         response = requests.request("POST", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils_rfc8040.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD))
+                                    auth=(test_utils_rfc8040.ODL_LOGIN, test_utils_rfc8040.ODL_PWD),
+                                    timeout=test_utils_rfc8040.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         self.assertEqual(response.json()['output']['status-message'], "The PMs has been successfully released !")
         time.sleep(2)
index 8c029aa1cc495ec75d4c9f1e0294951871007408..3e105a2f9e59a06447fcf3543a4bfca722f00c1e 100644 (file)
@@ -282,7 +282,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8144/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -424,7 +425,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "xpdr-network"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8144/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -512,7 +514,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -628,7 +631,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -680,7 +684,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -796,7 +801,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -829,7 +835,8 @@ class TransportPCEFulltesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
index c1436658fb98a7870cc6bb932de792cebb7fbf8e..5e5edfae16bb6324feb5c3a60d98e7cced884777 100644 (file)
@@ -286,7 +286,8 @@ class TransportNbiNotificationstesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
@@ -318,7 +319,8 @@ class TransportNbiNotificationstesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         time.sleep(2)
 
index d66f5e240efc8c7aaaf98103ce239db3ce16a6df..ca59c8162f294f815a5c878f495f4b97056170d5 100644 (file)
@@ -352,7 +352,8 @@ class TransportNbiNotificationstesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         # If the gate fails is because of the waiting time not being enough
         time.sleep(2)
@@ -379,7 +380,8 @@ class TransportNbiNotificationstesting(unittest.TestCase):
             "port-qual": "roadm-external"}]}
         response = requests.request("PUT", url.format("http://127.0.0.1:8141/restconf"),
                                     data=json.dumps(body), headers=test_utils.TYPE_APPLICATION_JSON,
-                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
+                                    auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD),
+                                    timeout=test_utils.REQUEST_TIMEOUT)
         self.assertEqual(response.status_code, requests.codes.ok)
         # If the gate fails is because of the waiting time not being enough
         time.sleep(2)