Esempio n. 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")
Esempio n. 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')
Esempio n. 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')