示例#1
0
def test_add_list_values(mocker, resources):
    mocked_signals = mocker.patch('solar.core.resource.resource.signals')
    args = {'ip': 'node1::ip',
            'servers': ['server1', 'server2'],
            'alias': 'ser1'
           }
    vr.update_inputs('service1', args)
    assert mocked_signals.connect.call_count == 1
示例#2
0
def test_add_list_values(mocker, resources):
    mocked_signals = mocker.patch('solar.core.resource.resource.signals')
    args = {'ip': 'node1::ip',
            'servers': ['server1', 'server2'],
            'alias': 'ser1'
           }
    vr.update_inputs('service1', args)
    assert mocked_signals.connect.call_count == 1
示例#3
0
def test_add_connections(mocker, resources):
    mocked_signals = mocker.patch(
        'solar.core.resource.resource.Resource.connect_with_events')
    args = {'ip': 'node1::ip',
            'servers': ['node1::ip', 'node2::ip'],
            'alias': 'ser1'
            }
    vr.update_inputs('service1', args)
    assert mocked_signals.call_count == 2
示例#4
0
def test_add_connections(mocker, resources):
    mocked_signals = mocker.patch(
        'solar.core.resource.resource.Resource.connect_with_events')
    args = {
        'ip': 'node1::ip',
        'servers': ['node1::ip', 'node2::ip'],
        'alias': 'ser1'
    }
    vr.update_inputs('service1', args)
    assert mocked_signals.call_count == 2
示例#5
0
def test_add_list_values(mocker, resources):
    mocked_signals = mocker.patch("solar.core.resource.resource.Resource.connect_with_events")
    args = {"ip": "node1::ip", "servers": ["server1", "server2"], "alias": "ser1"}
    vr.update_inputs("service1", args)
    assert mocked_signals.call_count == 1