test/builder: use handler factory everywhere
Convert all tests so they use the new handler factory method.
This commit is contained in:
parent
4325ad00b6
commit
00c2313226
1 changed files with 3 additions and 22 deletions
|
|
@ -396,14 +396,7 @@ class TestBuilderPlugin(PluginTest):
|
|||
@httpretty.activate
|
||||
def test_bad_request(self):
|
||||
# Simulate a bad request by asking for an unsupported architecture
|
||||
session = self.mock_session()
|
||||
options = self.mock_options()
|
||||
|
||||
handler = self.plugin.OSBuildImage(1,
|
||||
"osbuildImage",
|
||||
"params",
|
||||
session,
|
||||
options)
|
||||
handler = self.make_handler()
|
||||
|
||||
args = ["name", "version", "distro",
|
||||
["image_type"],
|
||||
|
|
@ -424,13 +417,7 @@ class TestBuilderPlugin(PluginTest):
|
|||
def test_compose_success(self):
|
||||
# Simulate a successful compose, check return value
|
||||
session = self.mock_session()
|
||||
options = self.mock_options()
|
||||
|
||||
handler = self.plugin.OSBuildImage(1,
|
||||
"osbuildImage",
|
||||
"params",
|
||||
session,
|
||||
options)
|
||||
handler = self.make_handler(session=session)
|
||||
|
||||
repos = ["http://1.repo", "https://2.repo"]
|
||||
args = ["name", "version", "distro",
|
||||
|
|
@ -464,13 +451,7 @@ class TestBuilderPlugin(PluginTest):
|
|||
def test_compose_failure(self):
|
||||
# Simulate a failed compose, check exception is raised
|
||||
session = self.mock_session()
|
||||
options = self.mock_options()
|
||||
|
||||
handler = self.plugin.OSBuildImage(1,
|
||||
"osbuildImage",
|
||||
"params",
|
||||
session,
|
||||
options)
|
||||
handler = self.make_handler(session=session)
|
||||
|
||||
args = ["name", "version", "distro",
|
||||
["image_type"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue