import json
import logging
log = logging.getLogger(__name__)
sh = logging.StreamHandler()
log.addHandler(sh)


def test_rule_access(as_user):
    r = as_user.get('/rules')
    assert r.status_code == 403
    r = as_user.post('/rules', json={'test': 'rule'})
    assert r.status_code == 403

8439fca8bd57db3b86645f8d6d154be74d8bb377
<mask token>


def test_rule_access(as_user):
    r = as_user.get('/rules')
    assert r.status_code == 403
    r = as_user.post('/rules', json={'test': 'rule'})
    assert r.status_code == 403

<mask token>
log.addHandler(sh)


def test_rule_access(as_user):
    r = as_user.get('/rules')
    assert r.status_code == 403
    r = as_user.post('/rules', json={'test': 'rule'})
    assert r.status_code == 403

<mask token>
log = logging.getLogger(__name__)
sh = logging.StreamHandler()
log.addHandler(sh)


def test_rule_access(as_user):
    r = as_user.get('/rules')
    assert r.status_code == 403
    r = as_user.post('/rules', json={'test': 'rule'})
    assert r.status_code == 403

import json
import logging
log = logging.getLogger(__name__)
sh = logging.StreamHandler()
log.addHandler(sh)


def test_rule_access(as_user):
    r = as_user.get('/rules')
    assert r.status_code == 403
    r = as_user.post('/rules', json={'test': 'rule'})
    assert r.status_code == 403
