Test: Adiciona getBens
[cascardo/irpf-gui.git] / test / test_bens.py
index e049675..5ebe162 100644 (file)
@@ -3,10 +3,22 @@ import unittest
 import sys
 import os
 
-myPath = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(0, myPath + '/../src')
+import dirs
+dirs.default_irpf_dir = dirs.IRPFTestDir()
 
-CONFIG = os.path.dirname(os.path.abspath(__file__))+'conf.py'
+from bens import Bens
+from contribuinte import Contribuinte
+
+class TestBens(unittest.TestCase):
+
+    def setUp(self):
+        self.cpf = '34278161174'
+        self.contribuinte = Contribuinte(self.cpf)
+        self.bens = Bens(self.contribuinte)
+
+    def test_GetBens(self):
+        self.assertEqual(self.bens.get_bens('totalExercicioAnterior'), '5.200,00')
+        self.assertEqual(self.bens.get_bens('totalExercicioAtual'), '0,00')
 
 if __name__ == '__main__':
     unittest.main()