def test_user_permissions(self):
        user = make_user('foo', 'bar', False)
        user2 = make_user('foo2', 'bar', False)
        p1 = UserPermission('pkg1', 'foo', True, False)
        p2 = UserPermission('pkg1', 'foo2', True, True)
        self.db.add_all([user, user2, p1, p2])
        transaction.commit()
        perms = self.access.user_permissions('pkg1', 'foo')
        self.assertEqual(perms, ['read'])
Retrieve a user's permissions on package from database
dataset/ETHPy150Open mathcamp/pypicloud/tests/test_access_backends.py/TestSQLBackend.test_user_permissions