示例#1
0
 def test_name(self):
     u = User.testing_create()
     u.name_first = u'x'
     u.name_last = u'y'
     db.sess.commit()
     eq_(u.name, 'x y')
     eq_(User.list_where(User.name == u'x y')[0], u)
示例#2
0
 def test_inactive_dated(self):
     u = User.testing_create()
     u.inactive_date = dt.date(2000, 1, 1)
     db.sess.commit()
     assert u.inactive
     eq_(User.list_where(User.inactive == sa.true())[0], u)
示例#3
0
 def test_inactive_flagged(self):
     u = User.testing_create()
     u.inactive_flag = True
     db.sess.commit()
     assert u.inactive
     eq_(User.list_where(User.inactive == sa.true())[0], u)