File fix-tests.patch of Package python-Glances

Index: glances-4.5.0/tests/test_restful.py
===================================================================
--- glances-4.5.0.orig/tests/test_restful.py
+++ glances-4.5.0/tests/test_restful.py
@@ -13,6 +13,7 @@
 import os
 import shlex
 import subprocess
+import sys
 import time
 import types
 import unittest
@@ -57,7 +58,7 @@
         if os.path.isfile('.venv/bin/python'):
             cmdline = ".venv/bin/python"
         else:
-            cmdline = "python"
+            cmdline = sys.executable
         cmdline += f" -m glances -B 0.0.0.0 -w --browser -p {SERVER_PORT} --disable-webui -C ./conf/glances.conf"
         print(f"Run the Glances Web Server on port {SERVER_PORT}")
         args = shlex.split(cmdline)
Index: glances-4.5.0/tests/test_xmlrpc.py
===================================================================
--- glances-4.5.0.orig/tests/test_xmlrpc.py
+++ glances-4.5.0/tests/test_xmlrpc.py
@@ -13,6 +13,7 @@
 import os
 import shlex
 import subprocess
+import sys
 import time
 import unittest

@@ -56,7 +57,7 @@
         if os.path.isfile('.venv/bin/python'):
             cmdline = ".venv/bin/python"
         else:
-            cmdline = "python"
+            cmdline = sys.executable
         cmdline += f" -m glances -B localhost -s -p {SERVER_PORT}"
         print(f"Run the Glances Server on port {SERVER_PORT}")
         args = shlex.split(cmdline)
openSUSE Build Service is sponsored by