• 老广's avatar
    Add new model to operate log (#3546) · 55c95c58
    老广 authored
    * [Update] 添加一下model到operate log, [platform,remoteapppermission,changeauthplan,gatherusertask]
    
    * [Bugfix] 修改了返回platform的几个位置,修改了command execution的url
    
    * [Update] 优化ops task表结构,避免列表页查询几十次sql, 优化了基础的encryptjsonfield
    
    * [Update] 修改adhoc 返回的become字段,避免密码泄露
    
    * [Update] 修改变量名称
    55c95c58
tests.py 363 Bytes
from django.test import TestCase

# Create your tests here.

from .utils import random_string, signer


def test_signer_len():
    results = {}
    for i in range(1, 4096):
        s = random_string(i)
        encs = signer.sign(s)
        results[i] = (len(encs)/len(s))
    results = sorted(results.items(), key=lambda x: x[1], reverse=True)
    print(results)