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'])
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"])