Ejemplo n.º 1
0
    def test_list_(self):
        """
        Test for Returns the machine's bridges list
        """
        mock = MagicMock(return_value=None)
        with patch.object(bridge, "_os_dispatch", mock):
            self.assertEqual(bridge.list_(), None)

        mock = MagicMock(return_value=["A", "B"])
        with patch.object(bridge, "_os_dispatch", mock):
            self.assertEqual(bridge.list_(), ["A", "B"])
Ejemplo n.º 2
0
    def test_list_(self):
        '''
        Test for Returns the machine's bridges list
        '''
        mock = MagicMock(return_value=None)
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.list_(), None)

        mock = MagicMock(return_value=['A', 'B'])
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.list_(), ['A', 'B'])
Ejemplo n.º 3
0
    def test_list_(self):
        '''
        Test for Returns the machine's bridges list
        '''
        mock = MagicMock(return_value=None)
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.list_(), None)

        mock = MagicMock(return_value=['A', 'B'])
        with patch.object(bridge, '_os_dispatch', mock):
            self.assertEqual(bridge.list_(), ['A', 'B'])