コード例 #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([])
コード例 #2
0
ファイル: test_stub.py プロジェクト: ezh/cloudselect
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)
コード例 #3
0
ファイル: test_stub.py プロジェクト: ezh/cloudselect
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])