[tests] add more standalone tests
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
cmd = 'test:echo %s' % ('c'*90000,)
|
||||
|
||||
from entropy.dump import unserialize_string
|
||||
from entropy.client.interfaces import Client
|
||||
from entropy.client.services.ugc.commands import Base
|
||||
from entropy.services.ugc.interfaces import Client as SockClient
|
||||
|
||||
cl = Client()
|
||||
srv = SockClient(cl, Base, ssl = True)
|
||||
srv.connect('192.168.1.1', 2000)
|
||||
session = srv.open_session()
|
||||
srv.transmit('%s %s' % (session, cmd,))
|
||||
print "cmd answer", srv.receive()
|
||||
srv.transmit('%s rc' % (session,))
|
||||
raw_data = srv.receive()
|
||||
if isinstance(raw_data, basestring):
|
||||
raw_data = unserialize_string(raw_data)
|
||||
print raw_data
|
||||
|
||||
srv.close_session(session)
|
||||
srv.disconnect()
|
||||
|
||||
cl.destroy()
|
||||
raise SystemExit(0)
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
import sys
|
||||
sys.argv.append("--debug")
|
||||
from entropy.client.interfaces import Client
|
||||
cl = Client()
|
||||
data = ['app-foo/foo']
|
||||
cl.UGC.add_download_stats('sabayonlinux.org', data)
|
||||
cl.destroy()
|
||||
raise SystemExit(0)
|
||||
Reference in New Issue
Block a user