Commit 4f3ef484 authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

tests.slap: use different hostnames for navigator tests

Since 65f73750 the URLs are cached, so
test was failing because they were not isolated.

/reviewed-on !45
parent e7940670
......@@ -393,7 +393,7 @@ class TestSlap(SlapMixin):
}
with httmock.HTTMock(handler):
self.slap.initializeConnection('http://bar')
self.slap.initializeConnection('http://%s' % self.id())
self.assertEqual(
self.slap._hateoas_navigator.slapos_master_hateoas_uri,
hateoas_url
......@@ -411,7 +411,7 @@ class TestSlap(SlapMixin):
self.fail('slap should not have contacted master to get Hateoas URL.')
with httmock.HTTMock(handler):
self.slap.initializeConnection('http://bar', slapgrid_rest_uri=hateoas_url)
self.slap.initializeConnection('http://%s' % self.id(), slapgrid_rest_uri=hateoas_url)
self.assertEqual(
self.slap._hateoas_navigator.slapos_master_hateoas_uri,
hateoas_url
......@@ -431,9 +431,10 @@ class TestSlap(SlapMixin):
}
with httmock.HTTMock(handler):
self.slap.initializeConnection('http://bar')
self.slap.initializeConnection('http://%s' % self.id())
self.assertEqual(None, getattr(self.slap, '_hateoas_navigator', None))
class TestComputer(SlapMixin):
"""
Tests slapos.slap.slap.Computer class functionality
......
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