From f0add73d801dfe1c82af5e6e7f7f1462dacb664f Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 10 Feb 2015 17:27:54 +0100 Subject: [PATCH] Cleanup --- old_tests/iou/test_iou_device.py | 41 -------------------------------- tests/test_main.py | 2 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 old_tests/iou/test_iou_device.py diff --git a/old_tests/iou/test_iou_device.py b/old_tests/iou/test_iou_device.py deleted file mode 100644 index 58581de9..00000000 --- a/old_tests/iou/test_iou_device.py +++ /dev/null @@ -1,41 +0,0 @@ -from gns3server.modules.iou import IOUDevice -import os -import pytest - - -def no_iou(): - cwd = os.path.dirname(os.path.abspath(__file__)) - iou_path = os.path.join(cwd, "i86bi_linux-ipbase-ms-12.4.bin") - - if os.path.isfile(iou_path): - return False - else: - return True - - -@pytest.fixture(scope="session") -def iou(request): - - cwd = os.path.dirname(os.path.abspath(__file__)) - iou_path = os.path.join(cwd, "i86bi_linux-ipbase-ms-12.4.bin") - iou_device = IOUDevice("IOU1", iou_path, "/tmp") - iou_device.start() - request.addfinalizer(iou_device.delete) - return iou_device - - -@pytest.mark.skipif(no_iou(), reason="IOU Image not available") -def test_iou_is_started(iou): - - print(iou.command()) - assert iou.id == 1 # we should have only one IOU running! - assert iou.is_running() - - -@pytest.mark.skipif(no_iou(), reason="IOU Image not available") -def test_iou_restart(iou): - - iou.stop() - assert not iou.is_running() - iou.start() - assert iou.is_running() diff --git a/tests/test_main.py b/tests/test_main.py index 645fd87a..cdf71631 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -29,7 +29,7 @@ def test_locale_check(): try: locale.setlocale(locale.LC_ALL, ("fr_FR")) - except: # Locale is not available on the server + except: # Locale is not available on the server return main.locale_check() assert locale.getlocale() == ('fr_FR', 'UTF-8')