root / elixir / trunk / tests / test_class_methods.py

Revision 490, 434 bytes (checked in by ged, 3 years ago)

Dropped support for python 2.3, SQLAlchemy 0.4 and deprecated stuff from Elixir
0.7

Line 
1"""
2    simple test case
3"""
4
5from elixir import *
6
7#-----------
8
9class TestOldMethods(object):
10    def setup(self):
11        metadata.bind = 'sqlite://'
12
13    def teardown(self):
14        cleanup_all()
15
16    def test_get(self):
17        class A(Entity):
18            name = Field(String(32))
19
20        setup_all(True)
21
22        a1 = A(name="a1")
23
24        session.commit()
25        session.expunge_all()
26
27        assert A.get(1).name == "a1"
Note: See TracBrowser for help on using the browser.