Exemplo n.º 1
0
    def test_get_all(self):
        '''
        Test to return a list of all available services
        '''
        with patch.object(os.path, 'isdir', side_effect=[False, True]):

            self.assertEqual(service.get_all(), [])

            with patch.object(os, 'listdir', return_value=['A', 'B']):
                self.assertListEqual(service.get_all(), ['A', 'B'])
Exemplo n.º 2
0
    def test_get_all(self):
        """
        Test to return a list of all available services
        """
        with patch.object(os.path, "isdir", side_effect=[False, True]):

            self.assertEqual(service.get_all(), [])

            with patch.object(os, "listdir", return_value=["A", "B"]):
                self.assertListEqual(service.get_all(), ["A", "B"])
Exemplo n.º 3
0
    def test_get_all(self):
        '''
        Test to return a list of all available services
        '''
        with patch.object(os.path, 'isdir', side_effect=[False, True]):

            self.assertEqual(service.get_all(), [])

            with patch.object(os, 'listdir', return_value=['A', 'B']):
                self.assertListEqual(service.get_all(), ['A', 'B'])