You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
838 B
28 lines
838 B
# coding=utf-8
|
|
import os
|
|
import django
|
|
import sys
|
|
import datetime
|
|
|
|
start = datetime.datetime.now()
|
|
sys.path.append("/var/www/projects/codemy/")
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings")
|
|
django.setup()
|
|
|
|
from lms.tools import comment_auth_data
|
|
from access.models import User as U
|
|
|
|
u = U.objects.get(id=2)
|
|
result = comment_auth_data(u)
|
|
#print(result)
|
|
def_json = '''json_encode: {"nick":"\u041d\u0438\u043a\u043e\u043b\u0430\u0439","avatar":"","id":"2","email":"bez.b.unix@gmail.com","profile_url":""}'''
|
|
def_sign = '''Sign: 9b185a7fa42ecfe88cebb36cd400a1b4'''
|
|
print('====================')
|
|
print(def_json)
|
|
print(def_sign)
|
|
print('-------------------')
|
|
for key, value in result.items():
|
|
if key == '== sign': print('%s %s' % ('---', bool(def_sign==value)))
|
|
print('%s: %s' % (key, value))
|
|
|
|
print('=====================')
|
|
|