Esempio n. 1
0
def test_stub_behaviour(mocker, cfgdir):
    """Assert calling run() for "cloudselect.report.stub" plugin."""
    cloud = CloudSelect(cfgdir)
    service_provider = cloud.plugin("cloudselect.report.stub", ReportServiceProvider)
    stub = service_provider()
    mocker.patch.object(Stub, "run")
    stub.run([])
    Stub.run.assert_called_once_with([])
Esempio n. 2
0
def test_stub_behaviour(mocker, tmpdir):
    """Assert calling run() for "cloudselect.group.stub" plugin."""
    cloud = CloudSelect(tmpdir)
    service_provider = cloud.plugin("cloudselect.group.stub", GroupServiceProvider)
    stub = service_provider()
    mocker.patch.object(Stub, "run")
    stub.run("aws", METADATA)
    Stub.run.assert_called_once_with("aws", METADATA)
Esempio n. 3
0
def test_stub_behaviour(mocker, cfgdir):
    """Assert calling run() for "cloudselect.pathfinder.stub" plugin."""
    cloud = CloudSelect(cfgdir)
    service_provider = cloud.plugin(
        "cloudselect.pathfinder.stub",
        PathFinderServiceProvider,
    )
    stub = service_provider()
    mocker.patch.object(Stub, "run")
    stub.run(INSTANCE, [INSTANCE])
    Stub.run.assert_called_once_with(INSTANCE, [INSTANCE])