HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
ftests_dbi_fetch Namespace Reference

Functions

def run_test ()
 

Detailed Description

HCE project, Python bindings, Distributed Tasks Manager application.
Event objects definitions.

@package: dtm
@file dbi.py
@author Oleksii <developers.hce@gmail.com>
@link: http://hierarchical-cluster-engine.com/
@copyright: Copyright &copy; 2013-2014 IOIX Ukraine
@license: http://hierarchical-cluster-engine.com/license/
@since: 0.1

Function Documentation

◆ run_test()

def ftests_dbi_fetch.run_test ( )

Definition at line 27 of file ftests_dbi_fetch.py.

27 def run_test():
28  config_dic = {"db_name":"sqlite:///:memory:"}
29  dbi = DBI(config_dic)
30  tl = TaskLog()
31  tls1 = TaskLogScheme(tl)
32  tls1.id = 11
33  tls2 = TaskLogScheme(tl)
34  tls2.id = 11
35  dbi.insert(tls1)
36  dbi.insert(tls2)
37  obj = dbi.fetch(tls1, "id=11")
38  print obj
39  if len(obj)!=2:
40  print "BAD"
41  else:
42  print"OK"
43  return
44 
45 
46