Skip to content

Commit

Permalink
[DEBUG] avoid get_version call to test failure cause
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Mar 28, 2019
1 parent 8c1cb0b commit 43ee382
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 8 additions & 2 deletions tests/test_magpie_api.py
Expand Up @@ -32,7 +32,9 @@ class TestCase_MagpieAPI_NoAuth_Local(ti.Interface_MagpieAPI_NoAuth, unittest.Te
def setUpClass(cls):
cls.app = utils.get_test_magpie_app()
cls.json_headers = utils.get_headers(cls.app, {'Accept': JSON_TYPE, 'Content-Type': JSON_TYPE})
# FIXME: use get_version()
cls.version = __meta__.__version__
#cls.version = utils.TestSetup.get_Version(cls)
cls.cookies = None
cls.usr = get_constant('MAGPIE_ANONYMOUS_USER')
cls.grp = get_constant('MAGPIE_ANONYMOUS_GROUP')
Expand Down Expand Up @@ -71,7 +73,9 @@ def setUpClass(cls):
cls.pwd = get_constant('MAGPIE_TEST_ADMIN_PASSWORD')
cls.json_headers = utils.get_headers(cls.app, {'Accept': JSON_TYPE, 'Content-Type': JSON_TYPE})
cls.cookies = None
cls.version = utils.TestSetup.get_Version(cls)
# FIXME: use get_version()
cls.version = __meta__.__version__
#cls.version = utils.TestSetup.get_Version(cls)
# TODO: fix UI views so that they can be 'found' directly in the WebTest.TestApp
# NOTE: localhost magpie has to be running for following login call to work
cls.headers, cls.cookies = utils.check_or_try_login_user(cls.app, cls.usr, cls.pwd,
Expand All @@ -98,7 +102,9 @@ def setUpClass(cls):
cls.cookies = None
cls.usr = get_constant('MAGPIE_ANONYMOUS_USER')
cls.grp = get_constant('MAGPIE_ANONYMOUS_GROUP')
cls.version = utils.TestSetup.get_Version(cls)
# FIXME: use get_version()
cls.version = __meta__.__version__
#cls.version = utils.TestSetup.get_Version(cls)


@runner.MAGPIE_TEST_API
Expand Down
7 changes: 5 additions & 2 deletions tests/test_magpie_ui.py
Expand Up @@ -8,13 +8,14 @@
Tests for `magpie.ui` module.
"""

import unittest
from magpie import __meta__
from magpie.common import JSON_TYPE
from magpie.constants import get_constant
from tests import utils, runner

# NOTE: must be imported without 'from', otherwise the interface's test cases are also executed
import tests.interfaces as ti
import unittest


@runner.MAGPIE_TEST_UI
Expand Down Expand Up @@ -58,7 +59,9 @@ def setUpClass(cls):
cls.url = cls.app # to simplify calls of TestSetup (all use .url)
cls.json_headers = utils.get_headers(cls.app, {'Accept': JSON_TYPE, 'Content-Type': JSON_TYPE})
cls.cookies = None
cls.version = utils.TestSetup.get_Version(cls)
# FIXME: use get_version()
cls.version = __meta__.__version__
# cls.version = utils.TestSetup.get_Version(cls)
cls.headers, cls.cookies = utils.check_or_try_login_user(cls.url, cls.usr, cls.pwd, use_ui_form_submit=True)
cls.require = "cannot run tests without logged in user with '{}' permissions".format(cls.grp)
cls.check_requirements()
Expand Down

0 comments on commit 43ee382

Please sign in to comment.