-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_test.py
54 lines (37 loc) · 1.07 KB
/
api_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import Socket2Server
import os
#a= Socket2Server.regist('test3', 'test')
#a = Socket2Server.login('test', 'test')
#print(a)
#type(a) = int
# dictt = Socket2Server.giveGuiAirList()
# print(dictt)
# a = Socket2Server.synAll('yygshezhi')
# print(a)
# folderPath = '/10'
# folderInfo = Socket2Server.giveGuiFolderChild(folderPath)
# print(folderInfo)
name = '/DSA.md'
fileInfo = Socket2Server.giveGuiOneFileInfo(name)
print(fileInfo)
#注意:
# token.cookie是 byte模式写入 避免了间隔符导致的密码写入读取失败。
# 返回值列表:
# a=0 token写入失败
# a=5 tcp错误
# a=1 注册成功
# a=2 注册名字被占用
# a=3 登陆成功
# a=4 登陆错误
# a=5 tcp错误
#-------
# a=6 token读取失败
# username,password = C.giveGuiUserName()
# print(username,password)
# 测试:
# $ cd "/Users/yuanyige/Library/Mobile Documents/com~apple~CloudDocs/Work/syn_201811211814/fileSYNserver"
# $ python3 S.py
# 跑在后台看到有 listen 即可
# getlist 需要修改,需要有返回值判断是失败还是空文件
# return 5 tcp
# ret. 8 fail