Exemplo 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())
Exemplo 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)
Exemplo 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())