Use https
Use https everywhere in tests just to get rid of ugly warning :-)
This commit is contained in:
parent
d2c5097af3
commit
e68f58c1b3
@ -100,14 +100,14 @@ class TestApiCalls(unittest.TestCase):
|
||||
}
|
||||
|
||||
# Initiate the pretty overrides
|
||||
self._register_pretty_url_get('http://localhost/source/openSUSE:Factory:Rings:0-Bootstrap',
|
||||
self._register_pretty_url_get('https://localhost/source/openSUSE:Factory:Rings:0-Bootstrap',
|
||||
'ring-0-project.xml')
|
||||
self._register_pretty_url_get('http://localhost/source/openSUSE:Factory:Core',
|
||||
self._register_pretty_url_get('https://localhost/source/openSUSE:Factory:Core',
|
||||
'ring-1-project.xml')
|
||||
|
||||
# Create the api object
|
||||
with mock_generate_ring_packages():
|
||||
api = oscs.StagingAPI('http://localhost')
|
||||
api = oscs.StagingAPI('https://localhost')
|
||||
self.assertEqual(ring_packages, api.ring_packages)
|
||||
|
||||
@httpretty.activate
|
||||
@ -195,12 +195,12 @@ class TestApiCalls(unittest.TestCase):
|
||||
'package': 'wine'}
|
||||
|
||||
# Initiate the pretty overrides
|
||||
self._register_pretty_url_get('http://localhost/source/openSUSE:Factory:Staging:B/wine',
|
||||
self._register_pretty_url_get('https://localhost/source/openSUSE:Factory:Staging:B/wine',
|
||||
'linksource.xml')
|
||||
|
||||
# Initiate the api with mocked rings
|
||||
with mock_generate_ring_packages():
|
||||
api = oscs.StagingAPI('http://localhost')
|
||||
api = oscs.StagingAPI('https://localhost')
|
||||
|
||||
# Compare the results, we only care now that we got 2 of them not the content
|
||||
self.assertEqual(package_info,
|
||||
@ -213,10 +213,10 @@ class TestApiCalls(unittest.TestCase):
|
||||
"""
|
||||
|
||||
with mock_generate_ring_packages():
|
||||
api = oscs.StagingAPI('http://localhost')
|
||||
api = oscs.StagingAPI('https://localhost')
|
||||
|
||||
httpretty.register_uri(
|
||||
httpretty.PUT, "http://localhost/source/openSUSE:Factory:Staging:B/wine/_meta")
|
||||
httpretty.PUT, "https://localhost/source/openSUSE:Factory:Staging:B/wine/_meta")
|
||||
|
||||
api.create_package_container('openSUSE:Factory:Staging:B', 'wine')
|
||||
self.assertEqual(httpretty.last_request().method, 'PUT')
|
||||
@ -264,12 +264,12 @@ class TestApiCalls(unittest.TestCase):
|
||||
"""
|
||||
|
||||
# Initiate the pretty overrides
|
||||
self._register_pretty_url_get('http://localhost/build/green/_result',
|
||||
self._register_pretty_url_get('https://localhost/build/green/_result',
|
||||
'build-results-green.xml')
|
||||
|
||||
# Initiate the api with mocked rings
|
||||
with mock_generate_ring_packages():
|
||||
api = oscs.StagingAPI('http://localhost')
|
||||
api = oscs.StagingAPI('https://localhost')
|
||||
|
||||
# Check print output
|
||||
self.assertEqual(api.gather_build_status("green"), None)
|
||||
@ -281,12 +281,12 @@ class TestApiCalls(unittest.TestCase):
|
||||
"""
|
||||
|
||||
# Initiate the pretty overrides
|
||||
self._register_pretty_url_get('http://localhost/build/red/_result',
|
||||
self._register_pretty_url_get('https://localhost/build/red/_result',
|
||||
'build-results-red.xml')
|
||||
|
||||
# Initiate the api with mocked rings
|
||||
with mock_generate_ring_packages():
|
||||
api = oscs.StagingAPI('http://localhost')
|
||||
api = oscs.StagingAPI('https://localhost')
|
||||
|
||||
# Check print output
|
||||
self.assertEqual(api.gather_build_status('red'), ['red', [{'path': 'standard/x86_64', 'state': 'building'}],
|
||||
@ -295,7 +295,7 @@ class TestApiCalls(unittest.TestCase):
|
||||
|
||||
def test_bootstrap_copy(self):
|
||||
import osclib.freeze_command
|
||||
fc = osclib.freeze_command.FreezeCommand('http://localhost')
|
||||
fc = osclib.freeze_command.FreezeCommand('https://localhost')
|
||||
|
||||
fp = self._get_fixture_path('staging-meta-for-bootstrap-copy.xml')
|
||||
fixture = subprocess.check_output('/usr/bin/xmllint --format %s' % fp, shell=True)
|
||||
|
@ -242,7 +242,7 @@ class OBS:
|
||||
self.reset_config()
|
||||
# Initiate the api with mocked rings
|
||||
with mock_generate_ring_packages():
|
||||
self.api = oscs.StagingAPI('http://localhost')
|
||||
self.api = oscs.StagingAPI('https://localhost')
|
||||
|
||||
def _get_fixtures_dir(self):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user