Fix test_files_at_url_pass
Previously there would be an error from mox related to urlopen in test_files_at_url_pass causing the test to fail. This commit gets around it by stubbing out url open instead of using mox. Change-Id: I1405862151f97ebfaa2cf22fd993cbc5f07e7b0c
This commit is contained in:
parent
ac8a3feacd
commit
12835a2d73
@ -24,10 +24,12 @@ class TestRequiredFiles(tests.TestCase):
|
||||
self.assertEqual(url,
|
||||
'http://logs.openstack.org/13/46613/2/check/gate-tempest-devstack-vm-full/864bf44')
|
||||
|
||||
def _fake_urlopen(self, url):
|
||||
pass
|
||||
|
||||
def test_files_at_url_pass(self):
|
||||
self.mox.StubOutWithMock(urllib2, 'urlopen')
|
||||
self.stubs.Set(urllib2, 'urlopen', self._fake_urlopen)
|
||||
result = elasticRecheck.RequiredFiles.files_at_url('http://logs.openstack.org/13/46613/2/check/gate-tempest-devstack-vm-full/864bf44')
|
||||
self.mox.ReplayAll()
|
||||
self.assertTrue(result)
|
||||
|
||||
def _invalid_url_open(self, url):
|
||||
|
Loading…
x
Reference in New Issue
Block a user