Exemplo n.º 1
0
 def setUp(self):
     self.obj = Method()
     self.p = IsContent()
     self.excel = OperationExcel()
Exemplo n.º 2
0
 def __init__(self):
     self.operationJson = OperationJson()
     self.excel = OperationExcel()
Exemplo n.º 3
0
 def __init__(self):
     self.excel = OperationExcel()
Exemplo n.º 4
0
from untils.operationJson import OperationJson
from untils.operationExcel import OperationExcel
from untils.public import *
import json
import random

operationJson = OperationJson()
operationExcel = OperationExcel()


def Login(username=None, password=None, grant_type=None, scope=None, row=None):
    '''对用户名重新赋值'''
    dici1 = operationJson.getRequestsData(row=row)
    dici1['username'] = username
    dici1['password'] = password
    dici1['grant_type'] = grant_type
    dici1['scope'] = scope
    return dici1


def writesupplierID(content, data, filename):
    '''把供应商ID写入文件中'''
    with open(data_dir(data=data, fileName=filename), "w") as f:
        f.write(json.dumps(content))


def getSupplierid(data, fileName):
    '''读取供应商ID'''
    with open(data_dir(data=data, fileName=fileName), 'r') as f:
        return f.read()