Test: Adiciona getBens
authorEduardo Elias Camponez <camponez@gmail.com>
Tue, 7 May 2013 01:51:34 +0000 (22:51 -0300)
committerEduardo Elias Camponez <camponez@gmail.com>
Sun, 7 Jul 2013 17:02:55 +0000 (14:02 -0300)
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()