Sfoglia il codice sorgente

active back tear down class

nico 8 anni fa
parent
commit
e2150c5612
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  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"