Example #1
0
    def test_interfaces(self):
        """
        Test for Returns interfaces attached to a bridge
        """
        self.assertEqual(bridge.interfaces(), None)

        mock = MagicMock(return_value={"interfaces": "A"})
        with patch.object(bridge, "_os_dispatch", mock):
            self.assertEqual(bridge.interfaces("br"), "A")
Example #2
0
    def test_interfaces(self):
        '''
        Test for Returns interfaces attached to a bridge
        '''
        self.assertEqual(bridge.interfaces(), None)

        mock = MagicMock(return_value={'interfaces': 'A'})
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.interfaces('br'), 'A')
Example #3
0
    def test_interfaces(self):
        '''
        Test for Returns interfaces attached to a bridge
        '''
        self.assertEqual(bridge.interfaces(), None)

        mock = MagicMock(return_value={'interfaces': 'A'})
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.interfaces('br'), 'A')