projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite runs and passes!
[zzz-floof.git]
/
floof
/
tests
/
test_models.py
diff --git
a/floof/tests/test_models.py
b/floof/tests/test_models.py
index
9b27a5c
..
ccd2a41
100644
(file)
--- a/
floof/tests/test_models.py
+++ b/
floof/tests/test_models.py
@@
-1,22
+1,22
@@
from sqlalchemy.exceptions import IntegrityError
from sqlalchemy.exceptions import IntegrityError
+from floof.model import User
+from floof.model.meta import Session
from floof.tests import *
from floof.tests import *
-from floof.tests import Session, metadata, Individual, create_all, drop_all
class TestMyModel(TestModel):
def test_simpleassert(self):
"""test description
"""
class TestMyModel(TestModel):
def test_simpleassert(self):
"""test description
"""
- einstein = Individual('einstein')
-
+ einstein = User(name=u'einstein', display_name=u'Einstein')
Session.commit()
Session.commit()
-
ind1 = Individual.get_by(name =
'einstein')
- assert
ind
1 == einstein
+
user1 = User.get_by(name = u
'einstein')
+ assert
user
1 == einstein
def test_exception(self):
def test_exception(self):
- me =
Individual(
'giuseppe')
- me_again =
Individual(
'giuseppe')
+ me =
User(name=u'giuseppe', display_name=u
'giuseppe')
+ me_again =
User(name=u'giuseppe', display_name=u
'giuseppe')
self.assertRaises(IntegrityError, Session.commit)
Session.rollback()
self.assertRaises(IntegrityError, Session.commit)
Session.rollback()