Commit bef72c49 authored by Marco Mariani's avatar Marco Mariani Committed by Cédric de Saint Martin

tests: simpler if..else logic (think straight!)

parent 0b662b60
...@@ -43,12 +43,10 @@ class SlapMixin(unittest.TestCase): ...@@ -43,12 +43,10 @@ class SlapMixin(unittest.TestCase):
Usefull methods for slap tests Usefull methods for slap tests
""" """
def setUp(self): def setUp(self):
self._server_url = os.environ.get('TEST_SLAP_SERVER_URL', None) self.server_url = os.environ.get('TEST_SLAP_SERVER_URL')
if self._server_url is None: if not self.server_url:
self._patchHttplib() self._patchHttplib()
self.server_url = 'http://localhost/' self.server_url = 'http://localhost/'
else:
self.server_url = self._server_url
print 'Testing against SLAP server %r' % self.server_url print 'Testing against SLAP server %r' % self.server_url
self.slap = slapos.slap.slap() self.slap = slapos.slap.slap()
self.partition_id = 'PARTITION_01' self.partition_id = 'PARTITION_01'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment