<commit_before>import requests, sys, json
from rdf_json import URI, BNode, RDF_JSON_Encoder
from base_constants import RDF, CE, VCARD, FOAF, AC, AC_R, AC_C, ANY_USER, ADMIN_USER
from test_utils import POST_HEADERS as CONTENT_RDF_JSON_HEADER
import test_utils

#DATASERVER_HOSTNAME = 'cloudapps4.me'
DATASERVER_HOSTNAME = 'localhost:3001'
if len(sys.argv) > 1:
    DATASERVER_HOSTNAME = sys.argv[1]
    
if DATASERVER_HOSTNAME.startswith('localhost'):
    HS_HOSTNAME = DATASERVER_HOSTNAME
else:
    HS_HOSTNAME = 'hostingsite.' + DATASERVER_HOSTNAME

ac_container_url = 'http://%s/ac' % HS_HOSTNAME
account_container_url = 'http://%s/account' % HS_HOSTNAME
mt_sites_container_url = 'http://%s/mt/sites' % HS_HOSTNAME

def run():
    #test_utils.delete(mt_sites_container_url)
    requests.delete(ac_container_url, headers=CONTENT_RDF_JSON_HEADER)
    requests.delete(account_container_url, headers=CONTENT_RDF_JSON_HEADER)

    body = {
        '' : {
            RDF+'type': URI(AC+'UserGroup'),
            AC+'who' : [
                URI(ANY_USER)
                ],
            AC+'may' : [
                URI('#permission_1'),<commit_msg>fix siteserver test to work with recent framework changes<commit_after>import requests, sys, json
from rdf_json import URI, BNode, RDF_JSON_Encoder
from base_constants import RDF, CE, VCARD, FOAF, AC, AC_R, AC_C, ANY_USER, ADMIN_USER
from test_utils import POST_HEADERS as CONTENT_RDF_JSON_HEADER
import test_utils

#DATASERVER_HOSTNAME = 'cloudapps4.me'
DATASERVER_HOSTNAME = 'localhost:3001'
if len(sys.argv) > 1:
    DATASERVER_HOSTNAME = sys.argv[1]
    
HS_HOSTNAME = 'hostingsite.' + DATASERVER_HOSTNAME

ac_container_url = 'http://%s/ac' % HS_HOSTNAME
account_container_url = 'http://%s/account' % HS_HOSTNAME
mt_sites_container_url = 'http://%s/mt/sites' % HS_HOSTNAME

def run():
    #test_utils.delete(mt_sites_container_url)
    requests.delete(ac_container_url, headers=CONTENT_RDF_JSON_HEADER)
    requests.delete(account_container_url, headers=CONTENT_RDF_JSON_HEADER)

    body = {
        '' : {
            RDF+'type': URI(AC+'UserGroup'),
            AC+'who' : [
                URI(ANY_USER)
                ],
            AC+'may' : [
                URI('#permission_1'),
{'fraction_non_alphanumeric': 0.10991957104557641, 'fraction_numerical': 0.0071492403932082215, 'mean_word_length': 3.7436440677966103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6685572', 'n_tokens_mistral': 821, 'n_tokens_neox': 787, 'n_words': 142}