def test_7():
    def _callback(resp, ch=None):
        assert resp == {
            'message': u'Success',
            'payload': {u'r': 0, u'm': 0, u'w': 0,
                        u'subscribe_key': subkey,
                        u'level': u'subkey', u'ttl': 1}
        }

    def _error(response):
        assert False

    pubnub_pam.grant(read=False, write=False, callback=_callback, error=_error)


# Complete flow , try publish on forbidden channel, grant permission to subkey and try again. ( Sync Mode)
dataset/ETHPy150Open pubnub/python/python-twisted/tests/test_grant_async.py/test_7/original