diff options
author | yvesf <yvesf-git@xapek.org> | 2011-07-24 13:12:14 +0200 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2011-07-24 13:12:14 +0200 |
commit | 02f48f7a905973428fc7766cf92bb04614e1fdca (patch) | |
tree | d80aa26d4fec9b293ae135c29b10fc071df8ef71 /test.py | |
parent | 75017423563a18986aa096566d8a2969c32c3588 (diff) | |
download | ebus-alt-02f48f7a905973428fc7766cf92bb04614e1fdca.tar.gz ebus-alt-02f48f7a905973428fc7766cf92bb04614e1fdca.zip |
cleanup, tag version 0.3v0.3
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/test.py b/test.py deleted file mode 100755 index 958c7b1..0000000 --- a/test.py +++ /dev/null @@ -1,36 +0,0 @@ -from ebus.web 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) - -model.ModelBase.metadata.create_all(engine) - -from sqlalchemy.orm import sessionmaker -Session = sessionmaker() -Session.configure(bind=engine) - -session = Session() - - -t1_sensor = model.Sensor("foosensor", "blatest") -session.add(t1_sensor) - -for i in xrange(10): - m = model.ValueInt(t1_sensor, 1) - session.add( m ) - - m = model.ValueFloat(t1_sensor, 1.2) - session.add( m ) - - m = model.ValueString(t1_sensor, "foobar") - session.add( m ) - - -session.commit() -session.close() - - - - |