예제 #1
0
파일: test_db.py 프로젝트: romainm/budget
 def test_recordAccount(self):
     db = Db(path=self.f.name + '/tmp')
     account = db.accountByName('test')
     db.recordAccount(account)
     self.assertTrue(account.isValid())
     self.assertTrue(account.exists())
예제 #2
0
파일: test_db.py 프로젝트: romainm/budget
 def test_accountByName_when_it_exists(self):
     db = Db(path=self.f.name + '/tmp')
     account = db.accountByName('test')
     db.recordAccount(account)
     account2 = db.accountByName('test')
     self.assertEqual(account.id, account2.id)
예제 #3
0
파일: test_db.py 프로젝트: romainm/budget
 def test_accountByName_when_it_does_not_exists(self):
     db = Db(path=self.f.name + '/tmp')
     account = db.accountByName('test')
     self.assertTrue(account.isValid())
     self.assertFalse(account.exists())