def test_list(self):
        self.request.db = MagicMock()
        self.request.db.distinct.return_value = ['a', 'b', 'c']
        self.request.access.has_permission.side_effect = lambda x, _: x == 'b'
        result = simple(self.request)
        self.assertEqual(result, {'pkgs': ['b']})
Simple list should return api call
dataset/ETHPy150Open mathcamp/pypicloud/tests/test_simple.py/TestSimple.test_list