Beispiel #1
0
def test_circuits_list_devices(runner, circuit, device_a, device_z):
    """ Test listing out a circuit's devices """

    with runner.isolated_filesystem():
        result = runner.run('circuits list -i {} devices'.format(
            circuit['id']))

        assert_outputs(result,
                       [[device_a['hostname']], [device_z['hostname']]])
Beispiel #2
0
def test_circuits_list_addresses(runner, circuit, interface_a, interface_z):
    """ Test listing out a circuit's interface addresses """

    with runner.isolated_filesystem():
        result = runner.run('circuits list -i {} addresses'.format(
            circuit['id']))

        assert_outputs(result, [[interface_a['addresses'][0].split('/')[0]],
                                [interface_z['addresses'][0].split('/')[0]]])