Explorar el Código

active back tear down class

nico hace 8 años
padre
commit
e2150c5612
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7 7
      Tests/test_rest_api.py

+ 7 - 7
Tests/test_rest_api.py

@@ -32,13 +32,13 @@ class TestRestAPI(unittest.TestCase):
         cls.flask_api.start()
         time.sleep(1)
 
-    # @classmethod
-    # def tearDownClass(cls):
-    #     """
-    #     executed once at the end of the test
-    #     """
-    #     url = "http://127.0.0.1:5000/shutdown/"
-    #     requests.post(url=url)
+    @classmethod
+    def tearDownClass(cls):
+        """
+        executed once at the end of the test
+        """
+        url = "http://127.0.0.1:5000/shutdown/"
+        requests.post(url=url)
 
     def setUp(self):
         self.base_url = "http://127.0.0.1:5000"