diff -Nru python-ofxhome-0.3.1/debian/changelog python-ofxhome-0.3.2/debian/changelog --- python-ofxhome-0.3.1/debian/changelog 2014-02-25 20:08:17.000000000 +0000 +++ python-ofxhome-0.3.2/debian/changelog 2014-12-31 19:24:00.000000000 +0000 @@ -1,3 +1,9 @@ +python-ofxhome (0.3.2-1) unstable; urgency=medium + + * New upstream version. + + -- Clint Adams Wed, 31 Dec 2014 14:23:43 -0500 + python-ofxhome (0.3.1-1) unstable; urgency=low * Initial release. diff -Nru python-ofxhome-0.3.1/debian/control python-ofxhome-0.3.2/debian/control --- python-ofxhome-0.3.1/debian/control 2014-02-25 20:36:26.000000000 +0000 +++ python-ofxhome-0.3.2/debian/control 2014-12-31 19:24:12.000000000 +0000 @@ -6,7 +6,7 @@ , dh-python , python-all (>= 2.7~) , python-setuptools -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: https://github.com/captin411/ofxhome X-Python-Version: >= 2.6 diff -Nru python-ofxhome-0.3.1/debian/patches/missing-testfiles.diff python-ofxhome-0.3.2/debian/patches/missing-testfiles.diff --- python-ofxhome-0.3.1/debian/patches/missing-testfiles.diff 1970-01-01 00:00:00.000000000 +0000 +++ python-ofxhome-0.3.2/debian/patches/missing-testfiles.diff 2014-12-31 19:36:26.000000000 +0000 @@ -0,0 +1,76 @@ +--- /dev/null ++++ b/ofxhome/tests/testfiles/badxml_bank.xml +@@ -0,0 +1,3 @@ ++ ++ ++ +--- /dev/null ++++ b/ofxhome/tests/testfiles/badxml_search.xml +@@ -0,0 +1,2 @@ ++ ++ +--- /dev/null ++++ b/ofxhome/tests/testfiles/jpmorgan.xml +@@ -0,0 +1,11 @@ ++ ++ ++JPMorgan Chase Bank ++1601 ++Chase Bank ++https://www.oasis.cfree.com/1601.ofxgp ++0 ++0 ++2014-08-17 22:23:35 ++2014-08-17 22:23:34 ++ +--- /dev/null ++++ b/ofxhome/tests/testfiles/scottrade.xml +@@ -0,0 +1,12 @@ ++ ++ ++Scottrade, Inc. ++777 ++Scottrade ++www.scottrade.com ++https://ofxstl.scottsave.com ++0 ++4 ++2012-08-13 22:28:10 ++2011-09-28 22:22:22 ++ +--- /dev/null ++++ b/ofxhome/tests/testfiles/search_america.xml +@@ -0,0 +1,18 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- /dev/null ++++ b/ofxhome/tests/testfiles/search_noexist.xml +@@ -0,0 +1,12 @@ ++ ++ ++
++ ++

A PHP Error was encountered

++ ++

Severity: Warning

++

Message: Invalid argument supplied for foreach()

++

Filename: public_html/api.php

++

Line Number: 37

++ ++
diff -Nru python-ofxhome-0.3.1/debian/patches/missing-tests.diff python-ofxhome-0.3.2/debian/patches/missing-tests.diff --- python-ofxhome-0.3.1/debian/patches/missing-tests.diff 2014-02-25 20:34:12.000000000 +0000 +++ python-ofxhome-0.3.2/debian/patches/missing-tests.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ ---- /dev/null -+++ b/tests/testfiles/badxml_bank.xml -@@ -0,0 +1,3 @@ -+ -+ -+ ---- /dev/null -+++ b/tests/testfiles/badxml_search.xml -@@ -0,0 +1,2 @@ -+ -+ ---- /dev/null -+++ b/tests/testfiles/scottrade.xml -@@ -0,0 +1,12 @@ -+ -+ -+Scottrade, Inc. -+777 -+Scottrade -+www.scottrade.com -+https://ofxstl.scottsave.com -+0 -+4 -+2012-08-13 22:28:10 -+2011-09-28 22:22:22 -+ ---- /dev/null -+++ b/tests/testfiles/search_america.xml -@@ -0,0 +1,18 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ ---- /dev/null -+++ b/tests/testfiles/search_noexist.xml -@@ -0,0 +1,12 @@ -+ -+ -+
-+ -+

A PHP Error was encountered

-+ -+

Severity: Warning

-+

Message: Invalid argument supplied for foreach()

-+

Filename: public_html/api.php

-+

Line Number: 37

-+ -+
---- /dev/null -+++ b/tests/test_suite.py -@@ -0,0 +1,93 @@ -+import sys, os -+sys.path.append('..') -+from ofxhome import OFXHome, Institution, InstitutionList -+import unittest -+import datetime -+ -+class InstitutionTestCase(unittest.TestCase): -+ -+ def testGoodParse(self): -+ xml = testfile('scottrade.xml').read() -+ i = Institution(xml) -+ self.assertEquals(i.id,'623') -+ self.assertEquals(i.name,'Scottrade, Inc.') -+ self.assertEquals(i.fid,'777') -+ self.assertEquals(i.org,'Scottrade') -+ self.assertEquals(i.brokerid,'www.scottrade.com') -+ self.assertEquals(i.url,'https://ofxstl.scottsave.com') -+ self.assertEquals(i.ofxfail,'0') -+ self.assertEquals(i.sslfail,'4') -+ self.assertEquals(i.lastofxvalidation,datetime.datetime(2012,8,13,22,28,10)) -+ self.assertEquals(i.lastsslvalidation,datetime.datetime(2011,9,28,22,22,22)) -+ self.assertEquals(i.xml, xml) -+ -+ def testFromFile(self): -+ i = Institution.from_file( testfile_name('scottrade.xml') ) -+ self.assertEquals(i.id,'623') -+ self.assertEquals(i['id'],'623') -+ -+ def testDictKeys(self): -+ xml = testfile('scottrade.xml').read() -+ i = Institution(xml) -+ self.assertEquals(i['id'],'623') -+ self.assertEquals(i['name'],'Scottrade, Inc.') -+ -+ i['id'] = '123' -+ self.assertEquals(i['id'],'123') -+ -+ def testBadParse(self): -+ xml = testfile('badxml_bank.xml').read() -+ try: -+ l = Institution(xml) -+ self.assertFalse(0) -+ except Exception: -+ self.assertTrue(1) -+ -+class InstitutionListTestCase(unittest.TestCase): -+ -+ def testFromFile(self): -+ l = InstitutionList.from_file( testfile_name('search_america.xml') ) -+ self.assertEquals(len(l),15) -+ -+ def testGoodResult(self): -+ xml = testfile('search_america.xml').read() -+ l = InstitutionList(xml) -+ self.assertEquals(len(l),15) -+ self.assertEquals(l.xml,xml) -+ self.assertEquals(l[0]['id'],'533') -+ self.assertEquals(l[0]['name'],'America First Credit Union') -+ -+ def testResultWithPHPError(self): -+ xml = testfile('search_noexist.xml').read() -+ l = InstitutionList(xml) -+ self.assertEquals(len(l),0) -+ self.assertEquals(l.xml,xml) -+ -+ def testIterator(self): -+ count = 0 -+ xml = testfile('search_america.xml').read() -+ l = InstitutionList(xml) -+ for i in l: -+ count += 1 -+ self.assertEquals(count,15) -+ -+ def testBadXML(self): -+ xml = testfile('badxml_search.xml').read() -+ try: -+ l = InstitutionList(xml) -+ self.assertFalse(0) -+ except Exception: -+ self.assertTrue(1) -+ -+def testfile_name(filename): -+ path = 'testfiles/' + filename -+ if ('tests' in os.listdir('.')): -+ path = 'tests/' + path -+ return path -+ -+def testfile(filename): -+ return file(testfile_name(filename)) -+ -+ -+if __name__ == '__main__': -+ unittest.main() ---- /dev/null -+++ b/tests/__init__.py -@@ -0,0 +1 @@ -+# diff -Nru python-ofxhome-0.3.1/debian/patches/series python-ofxhome-0.3.2/debian/patches/series --- python-ofxhome-0.3.1/debian/patches/series 2014-02-25 20:27:20.000000000 +0000 +++ python-ofxhome-0.3.2/debian/patches/series 2014-12-31 19:33:51.000000000 +0000 @@ -1 +1 @@ -missing-tests.diff +missing-testfiles.diff diff -Nru python-ofxhome-0.3.1/ofxhome/__init__.py python-ofxhome-0.3.2/ofxhome/__init__.py --- python-ofxhome-0.3.1/ofxhome/__init__.py 2012-09-07 13:39:03.000000000 +0000 +++ python-ofxhome-0.3.2/ofxhome/__init__.py 2014-08-19 02:50:44.000000000 +0000 @@ -2,7 +2,7 @@ from datetime import datetime from xml.dom.minidom import parseString -__version__ = '0.3.1' +__version__ = '0.3.2' API_URL='http://www.ofxhome.com/api.php' @@ -61,7 +61,10 @@ def _text(parent,name): rc = [] - for node in parent.getElementsByTagName(name)[0].childNodes: + elements = parent.getElementsByTagName(name) + if not elements: + return '' + for node in elements[0].childNodes: if node.nodeType == node.TEXT_NODE: rc.append(node.data) return ''.join(rc) diff -Nru python-ofxhome-0.3.1/ofxhome/tests/test_suite.py python-ofxhome-0.3.2/ofxhome/tests/test_suite.py --- python-ofxhome-0.3.1/ofxhome/tests/test_suite.py 1970-01-01 00:00:00.000000000 +0000 +++ python-ofxhome-0.3.2/ofxhome/tests/test_suite.py 2014-08-19 02:47:52.000000000 +0000 @@ -0,0 +1,109 @@ +import sys, os, os.path +from ofxhome import OFXHome, Institution, InstitutionList +import unittest +import datetime + +class InstitutionTestCase(unittest.TestCase): + + def testGoodParse(self): + xml = testfile('scottrade.xml').read() + i = Institution(xml) + self.assertEquals(i.id,'623') + self.assertEquals(i.name,'Scottrade, Inc.') + self.assertEquals(i.fid,'777') + self.assertEquals(i.org,'Scottrade') + self.assertEquals(i.brokerid,'www.scottrade.com') + self.assertEquals(i.url,'https://ofxstl.scottsave.com') + self.assertEquals(i.ofxfail,'0') + self.assertEquals(i.sslfail,'4') + self.assertEquals(i.lastofxvalidation,datetime.datetime(2012,8,13,22,28,10)) + self.assertEquals(i.lastsslvalidation,datetime.datetime(2011,9,28,22,22,22)) + self.assertEquals(i.xml, xml) + + def testOptionalBroker(self): + xml = testfile('jpmorgan.xml').read() + i = Institution(xml) + self.assertEquals(i.id,'435') + self.assertEquals(i.name,'JPMorgan Chase Bank') + self.assertEquals(i.fid,'1601') + self.assertEquals(i.org,'Chase Bank') + self.assertEquals(i.brokerid,'') + self.assertEquals(i.url,'https://www.oasis.cfree.com/1601.ofxgp') + self.assertEquals(i.ofxfail,'0') + self.assertEquals(i.sslfail,'0') + self.assertEquals(i.lastofxvalidation,datetime.datetime(2014,8,17,22,23,35)) + self.assertEquals(i.lastsslvalidation,datetime.datetime(2014,8,17,22,23,34)) + self.assertEquals(i.xml, xml) + + def testFromFile(self): + i = Institution.from_file( testfile_name('scottrade.xml') ) + self.assertEquals(i.id,'623') + self.assertEquals(i['id'],'623') + + def testDictKeys(self): + xml = testfile('scottrade.xml').read() + i = Institution(xml) + self.assertEquals(i['id'],'623') + self.assertEquals(i['name'],'Scottrade, Inc.') + + i['id'] = '123' + self.assertEquals(i['id'],'123') + + def testBadParse(self): + xml = testfile('badxml_bank.xml').read() + try: + l = Institution(xml) + self.assertFalse(0) + except Exception: + self.assertTrue(1) + +class InstitutionListTestCase(unittest.TestCase): + + def testFromFile(self): + l = InstitutionList.from_file( testfile_name('search_america.xml') ) + self.assertEquals(len(l),15) + + def testGoodResult(self): + xml = testfile('search_america.xml').read() + l = InstitutionList(xml) + self.assertEquals(len(l),15) + self.assertEquals(l.xml,xml) + self.assertEquals(l[0]['id'],'533') + self.assertEquals(l[0]['name'],'America First Credit Union') + + def testResultWithPHPError(self): + xml = testfile('search_noexist.xml').read() + l = InstitutionList(xml) + self.assertEquals(len(l),0) + self.assertEquals(l.xml,xml) + + def testIterator(self): + count = 0 + xml = testfile('search_america.xml').read() + l = InstitutionList(xml) + for i in l: + count += 1 + self.assertEquals(count,15) + + def testBadXML(self): + xml = testfile('badxml_search.xml').read() + try: + l = InstitutionList(xml) + self.assertFalse(0) + except Exception: + self.assertTrue(1) + +def testfile_name(filename): + base_path = os.path.dirname(os.path.abspath(__file__)) + + path = os.path.join(base_path,'testfiles',filename) + if ('tests' in os.listdir('.')): + path = os.path.join('tests',path) + return path + +def testfile(filename): + return file(testfile_name(filename)) + + +if __name__ == '__main__': + unittest.main() diff -Nru python-ofxhome-0.3.1/ofxhome.egg-info/PKG-INFO python-ofxhome-0.3.2/ofxhome.egg-info/PKG-INFO --- python-ofxhome-0.3.1/ofxhome.egg-info/PKG-INFO 2012-09-07 13:44:09.000000000 +0000 +++ python-ofxhome-0.3.2/ofxhome.egg-info/PKG-INFO 2014-08-19 03:24:24.000000000 +0000 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: ofxhome -Version: 0.3.1 +Version: 0.3.2 Summary: ofxhome.com financial institution lookup REST client Home-page: https://github.com/captin411/ofxhome Author: David Bartle @@ -25,6 +25,7 @@ example ======= + ```python from ofxhome import OFXHome s = OFXHome.search("USAA") @@ -36,6 +37,7 @@ bank = OFXHome.lookup(item.id) print bank.name _ bank.fid _ bank.url _ bank.brokerid # OR print bank['name'] _ bank['fid'] _ bank['url'] _ bank['brokerid'] + ``` Keywords: ofx,Open Financial Exchange,bank search,ofxhome,ofxhome.com Platform: UNKNOWN diff -Nru python-ofxhome-0.3.1/ofxhome.egg-info/SOURCES.txt python-ofxhome-0.3.2/ofxhome.egg-info/SOURCES.txt --- python-ofxhome-0.3.1/ofxhome.egg-info/SOURCES.txt 2012-09-07 13:44:09.000000000 +0000 +++ python-ofxhome-0.3.2/ofxhome.egg-info/SOURCES.txt 2014-08-19 03:24:24.000000000 +0000 @@ -7,4 +7,6 @@ ofxhome.egg-info/dependency_links.txt ofxhome.egg-info/entry_points.txt ofxhome.egg-info/top_level.txt -ofxhome.egg-info/zip-safe \ No newline at end of file +ofxhome.egg-info/zip-safe +ofxhome/tests/__init__.py +ofxhome/tests/test_suite.py \ No newline at end of file diff -Nru python-ofxhome-0.3.1/PKG-INFO python-ofxhome-0.3.2/PKG-INFO --- python-ofxhome-0.3.1/PKG-INFO 2012-09-07 13:44:11.000000000 +0000 +++ python-ofxhome-0.3.2/PKG-INFO 2014-08-19 03:24:28.000000000 +0000 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: ofxhome -Version: 0.3.1 +Version: 0.3.2 Summary: ofxhome.com financial institution lookup REST client Home-page: https://github.com/captin411/ofxhome Author: David Bartle @@ -25,6 +25,7 @@ example ======= + ```python from ofxhome import OFXHome s = OFXHome.search("USAA") @@ -36,6 +37,7 @@ bank = OFXHome.lookup(item.id) print bank.name _ bank.fid _ bank.url _ bank.brokerid # OR print bank['name'] _ bank['fid'] _ bank['url'] _ bank['brokerid'] + ``` Keywords: ofx,Open Financial Exchange,bank search,ofxhome,ofxhome.com Platform: UNKNOWN diff -Nru python-ofxhome-0.3.1/README python-ofxhome-0.3.2/README --- python-ofxhome-0.3.1/README 2012-08-27 22:19:33.000000000 +0000 +++ python-ofxhome-0.3.2/README 2014-08-19 02:25:49.000000000 +0000 @@ -17,6 +17,7 @@ example ======= +```python from ofxhome import OFXHome s = OFXHome.search("USAA") @@ -28,3 +29,4 @@ bank = OFXHome.lookup(item.id) print bank.name _ bank.fid _ bank.url _ bank.brokerid # OR print bank['name'] _ bank['fid'] _ bank['url'] _ bank['brokerid'] +``` diff -Nru python-ofxhome-0.3.1/setup.py python-ofxhome-0.3.2/setup.py --- python-ofxhome-0.3.1/setup.py 2012-09-07 13:38:01.000000000 +0000 +++ python-ofxhome-0.3.2/setup.py 2014-08-19 03:20:28.000000000 +0000 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='ofxhome', - version="0.3.1", + version="0.3.2", description="ofxhome.com financial institution lookup REST client", long_description=open("./README", "r").read(), classifiers=[ @@ -19,11 +19,11 @@ author_email='captindave@gmail.com', url='https://github.com/captin411/ofxhome', license='MIT License', - packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + packages=find_packages(exclude=['ez_setup', 'examples']), include_package_data=True, zip_safe=True, install_requires=[ ], - test_suite = 'tests', + test_suite = 'ofxhome.tests', entry_points=""" """, )