<commit_before>
import unittest
import common

_S = "AuthzStatic"
_S2 = "AuthzStatic2"

def setUpModule():
    r = common.primary_session.get('schema/%s' % _S)
    if r.status_code == 404:
        # idempotent because unittest can re-enter module several times...
        common.primary_session.post('schema', json=_defs).raise_for_status()

# catalog has these rights:
#  owner: [primary_client_id]
#  enumerate: ['*']
#  select: ['*']
#  else: []

class Authz (common.ErmrestTest):
    # authz tests will use secondary_session to drop implicit ownership-based rights
    session = common.secondary_session

    schema = {}
    schema2 = {}
    T1 = {
        "select": ["*"]
    }
    T1_id = {
        'select': ['*']
    }
    T1_name = {}<commit_msg>add missing unittest.skipIf in authz tests requiring secondary session<commit_after>
import unittest
import common

_S = "AuthzStatic"
_S2 = "AuthzStatic2"

def setUpModule():
    r = common.primary_session.get('schema/%s' % _S)
    if r.status_code == 404:
        # idempotent because unittest can re-enter module several times...
        common.primary_session.post('schema', json=_defs).raise_for_status()

# catalog has these rights:
#  owner: [primary_client_id]
#  enumerate: ['*']
#  select: ['*']
#  else: []

@unittest.skipIf(common.secondary_session is None, "Authz test requires TEST_COOKIES2")
class Authz (common.ErmrestTest):
    # authz tests will use secondary_session to drop implicit ownership-based rights
    session = common.secondary_session

    schema = {}
    schema2 = {}
    T1 = {
        "select": ["*"]
    }
    T1_id = {
        'select': ['*']
    }
    T1_name = {}
{'fraction_non_alphanumeric': 0.1323262839879154, 'fraction_numerical': 0.011480362537764351, 'mean_word_length': 3.235294117647059, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6061443', 'n_tokens_mistral': 556, 'n_tokens_neox': 547, 'n_words': 131}