diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2010-06-09 18:13:33 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2010-06-09 18:13:33 +0000 |
commit | 4b320a8d744b8efeb27c983bb6f08208ec743c29 (patch) | |
tree | ea400f4739f3eafeb6ea34d5e35bd943dab6d458 /test.py | |
parent | feebdc2e14426921a585c31c5279886bca3e2eca (diff) | |
download | ebus-alt-4b320a8d744b8efeb27c983bb6f08208ec743c29.tar.gz ebus-alt-4b320a8d744b8efeb27c983bb6f08208ec743c29.zip |
blablabla
git-svn-id: http://10.2.2.13/svn/common/ebus@1677 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -1,11 +1,11 @@ +from ebus.web import model -import model from sqlalchemy import create_engine -#engine = create_engine('sqlite:///:memory:', echo=True) -engine = create_engine("postgresql://yvesf:iii@10.2.2.13:5432/yvesf", echo=True) +engine = create_engine('sqlite:///:memory:', echo=True) +#engine = create_engine("postgresql://yvesf:iii@10.2.2.13:5432/yvesf", echo=True) -model.Base.metadata.create_all(engine) +model.ModelBase.metadata.create_all(engine) from sqlalchemy.orm import sessionmaker Session = sessionmaker() @@ -17,14 +17,11 @@ session = Session() t1_sensor = model.Sensor("foosensor", "blatest") session.add(t1_sensor) -t1_value1 = model.Value(t1_sensor, 0.5) -session.add(t1_value1) +for i in xrange(10000): + session.add( model.Value(t1_sensor, 0.5) ) session.commit() - - - session.close() |