<commit_before>import lib.database
lib.database.db.connect(host="10.11.11.24", database="dev_medlem2", username="postgres")
import model.bylaw
import model.user
import model.address

#__builtins__.db=db

params=dict()
params['bylaw']='asd'
params['created_by']=0
m=model.bylaw.Bylaw.create(params)

print "asd", m['bylaw']

m['bylaw'] = "aoieusth8isuey4zhj8rifu4hkr"

print "aoieusth8isuey4zhj8rifu4hkr", m['bylaw']

u=model.user.User(0)

print "admin", u['name']

print "True", u.authenticate("admin")

print "None", u.set_password("<PASSWORD>")

print "False", u.authenticate("admin")

print "None", u.set_password("<PASSWORD>")

print "True", u.authenticate("admin")

params=dict()
params['email']=''
params['phone']=''
params['address_line1']=''
params['address_line2']=''
params['postal_code']=''
params['town']=''
params['created_by']=0
a=model.address.Address.create(params)
<commit_msg>Update test to match new db-schema<commit_after>import lib.database
lib.database.db.connect(host="10.11.11.24", database="dev_medlem2", username="postgres")
import model.bylaw
import model.user
import model.address

#__builtins__.db=db

params=dict()
params['bylaw']='asd'
params['created_by']=0
m=model.bylaw.Bylaw.create(params)

print "asd", m['bylaw']

m['bylaw'] = "aoieusth8isuey4zhj8rifu4hkr"

print "aoieusth8isuey4zhj8rifu4hkr", m['bylaw']

u=model.user.User(0)

print "admin", u['name']

print "True", u.authenticate("admin")

print "None", u.set_password("<PASSWORD>")

print "False", u.authenticate("admin")

print "None", u.set_password("<PASSWORD>")

print "True", u.authenticate("admin")

params=dict()
params['address_line1']=''
params['address_line2']=''
params['postal_code']=''
params['town']=''
params['created_by']=0
a=model.address.Address.create(params)

{'fraction_non_alphanumeric': 0.19932241671372106, 'fraction_numerical': 0.024844720496894408, 'mean_word_length': 8.578378378378378, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2378749', 'n_tokens_mistral': 702, 'n_tokens_neox': 705, 'n_words': 107}