# coding=utf-8
import unittest
import ast
import ddt
import json
import time
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel

wenjian = EXECL_PATH + '\\jekn.xlsx'  #查询到对应的case文件
excel_kong = read_excel(wenjian, '合仓开空')
excel_duo = read_excel(wenjian, '合仓开多')
db_link = db_commit()
rise = 315782
drop = 316095
url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1 = {
    "Content-Type": "application/json",
}
api_kill = requests.get(url=url, headers=headers_1)
time.sleep(3)
'''
限价合仓开空+合仓开多
一个用户下两笔开多
一个用户下两笔开空
'''
Beispiel #2
0
from Public.log import logger, LOG
import os
import requests
import json
import ddt
import unittest
from Public.get_execl import read_excel
from Public.db_commit import db_commit
from Public.cogfig import EXECL_PATH

wenjian = EXECL_PATH + '\\jekn.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian, 'Sheet1')
db_link = db_commit()
mysql_link = db_link.connect()
'''
不用数据驱动取单个值
'''


class Test_Login(unittest.TestCase):
    def setUp(self):
        logger("运行")

    def tearDown(self):
        pass

    def test_shuj(self):
        #获取execl里面的第一列
        data1 = excel.exexl('url')
        #获取exexl的第二列参数值
        data2 = excel.exexl('参数')
# coding=utf-8
import unittest
import time
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
from Interface.Character import Character_split
wenjian = EXECL_PATH + '\\cancel_order.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian, '逐仓撤单')
db_link = db_commit()
slice_Character = Character_split()  #截取字符
#逐仓用户多次撤单校验
rise = '315900'

url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1 = {
    "Content-Type": "application/json",
}
api_kill = requests.get(url=url, headers=headers_1)
time.sleep(3)
'''

逐仓部分撤单
多次撤单校验(最后一次撤单,撤单异常)
'''

Beispiel #4
0
import ddt
import json
from decimal import Decimal
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
import time
from Public.redis_value import redis_dta
from Interface.Character import Character_split
wenjian = EXECL_PATH + '\\set_lever.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian,'逐仓增加杠杆')
update_redis=redis_dta()#调用缓存方法,实例化类,调用方法

db_link=db_commit()#调用数据库
slice_Character=Character_split()#截取字符
single='315736'
url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1= {"Content-Type": "application/json"}
api_kill= requests.get(url=url,headers=headers_1)
time.sleep(3)
'''
逐仓限价开多(减少杠杆)+逐仓强平价(减少杠杆)
一个用户开多开空,调整杠杆
'''
@ddt.ddt()
class Test_Loginrisr(unittest.TestCase):
# coding=utf-8
import unittest
import ast
import ddt
import json
import time
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
from Interface.Character import Character_split
wenjian = EXECL_PATH + '\\creata_interface.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian, '全仓成交一半')
db_link = db_commit()
slice_Character = Character_split()  #截取字符
#全仓部分成交
rise = '316032'
drop = '315766'

url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1 = {
    "Content-Type": "application/json",
}
api_kill = requests.get(url=url, headers=headers_1)
time.sleep(3)
'''
全仓
限价买涨+加买跌=成交一半数量
Beispiel #6
0
# coding=utf-8
import unittest

import ddt
import json
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
import time

wenjian = EXECL_PATH + '\\append_bail.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian, '减少保证金')
db_link = db_commit()
single = '316173'
url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1 = {
    "Content-Type": "application/json",
}
api_kill = requests.get(url=url, headers=headers_1)
time.sleep(3)
'''
逐仓限价开多(减少保证金)+逐仓强平价(减少保证金)
一个用户开多开空,追加保证金,然后减少保证金
'''


@ddt.ddt()
Beispiel #7
0
# coding=utf-8
import unittest
import time
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
from Interface.Character import Character_split
wenjian = EXECL_PATH + '\\cancel_order.xlsx'  #查询到对应的case文件
excel = read_excel(wenjian, '全仓部分撤单')
db_link = db_commit()
slice_Character = Character_split()  #截取字符
#全仓用户多次撤单校验
rise = '316183'

url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1 = {
    "Content-Type": "application/json",
}
api_kill = requests.get(url=url, headers=headers_1)
time.sleep(3)
'''

全仓部分撤单
多次撤单校验(最后一次撤单,撤单异常)
'''

# coding=utf-8
import unittest
import ast
import ddt
import json
import time
from Interface.test_login import Test_Login
from Public.cogfig import EXECL_PATH
from Public.db_commit import db_commit
import requests
from Public.log import LOG
from Interface.tese_requests_single import requests_single
from Public.get_execl import read_excel
from Interface.Character import Character_split
wenjian = EXECL_PATH + '\\creata_interface.xlsx'  #查询到对应的case文件
excel= read_excel(wenjian, '下单成交一半')
db_link=db_commit()
slice_Character=Character_split()#截取字符

rise='316463'

url = 'https://t01-mapi.deepcoin.pro/site/kill'
headers_1= {"Content-Type": "application/json", }
api_kill= requests.get(url=url,headers=headers_1)
time.sleep(3)
'''
逐仓
限价买涨+加买跌=成交一半数量
一个用户买涨1
用户买跌0.3,成交之后,再次下单0.7
'''