summaryrefslogtreecommitdiffstats
path: root/src/python/lmi/test/lmibase.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/lmi/test/lmibase.py')
-rw-r--r--src/python/lmi/test/lmibase.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/python/lmi/test/lmibase.py b/src/python/lmi/test/lmibase.py
index 53b61c8..7f997d8 100644
--- a/src/python/lmi/test/lmibase.py
+++ b/src/python/lmi/test/lmibase.py
@@ -82,6 +82,8 @@ class LmiTestCase(base.BaseLmiTestCase):
_SYSTEM_INAME = None
+ _LMICONNECTION = None
+
@classmethod
def needs_indications(cls):
"""
@@ -112,7 +114,7 @@ class LmiTestCase(base.BaseLmiTestCase):
abstraction.
:rtype: :py:class:`lmi.shell.LMIConnection`
"""
- if not hasattr(self, '_shellconnection'):
+ if LmiTestCase._LMICONNECTION is None:
kwargs = {}
con_argspec = inspect.getargspec(connect)
# support older versions of lmi shell
@@ -122,9 +124,9 @@ class LmiTestCase(base.BaseLmiTestCase):
elif 'verify_certificate' in con_argspec.args:
# older one
kwargs['verify_certificate'] = False
- self._shellconnection = connect(
+ LmiTestCase._LMICONNECTION = connect(
self.url, self.username, self.password, **kwargs)
- return self._shellconnection
+ return LmiTestCase._LMICONNECTION
@property
def ns(self):