1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 00:38:10 +00:00

Fix tests on Windows

This commit is contained in:
ziajka 2018-06-28 09:16:51 +02:00
parent 41026c74c1
commit dd845eb096
2 changed files with 5 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class IndexHandler:
static = get_static_path(filename) static = get_static_path(filename)
if not os.path.exists(static): if not os.path.exists(static):
static = get_static_path('web-ui/index.html') static = get_static_path(os.path.join('web-ui', 'index.html'))
yield from response.file(static) yield from response.file(static)

View File

@ -15,8 +15,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from gns3server.utils.static import get_static_path from gns3server.utils.static import get_static_path
def test_get_static_path(): def test_get_static_path():
assert get_static_path('test').endswith('gns3server/static/test') expected = os.path.join('gns3server', 'static', 'test')
assert get_static_path('test').endswith(expected)