def test_flat_override(self):

        driver = linux_net.LinuxBridgeInterfaceDriver()

        info = {}

        @staticmethod
        def test_ensure(bridge, interface, network, gateway):
            info['passed_interface'] = interface

        self.stubs.Set(linux_net.LinuxBridgeInterfaceDriver,
                       'ensure_bridge', test_ensure)

        network = {
                "bridge": "br100",
                "bridge_interface": "base_interface",
                "share_address": False,
        }
        driver.plug(network, "fakemac")
        self.assertEqual("base_interface", info['passed_interface'])
        self.flags(flat_interface="override_interface")
        driver.plug(network, "fakemac")
        self.assertEqual("override_interface", info['passed_interface'])
Write the data encoding the Certificate object to a stream.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/network/test_linux_net.py/LinuxNetworkTestCase.test_flat_override--crossover with--dataset/ETHPy150Open OpenKMIP/PyKMIP/kmip/core/secrets.py/Certificate.write