Esempio n. 1
0
 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())
Esempio n. 2
0
 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)
Esempio n. 3
0
 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())