From 844ba3b0a6bf87cffa7398952a46c6ae6ff170c8 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Tue, 25 Feb 2014 13:03:49 -0500 Subject: Import Debian changes 0.3.1-1 python-ofxhome (0.3.1-1) unstable; urgency=low * Initial release. --- debian/changelog | 5 ++ debian/compat | 1 + debian/control | 27 +++++++ debian/copyright | 33 ++++++++ debian/patches/missing-tests.diff | 162 ++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/python-ofxparse.docs | 1 + debian/python3-ofxparse.docs | 1 + debian/rules | 9 +++ debian/source/format | 1 + debian/watch | 3 + 11 files changed, 244 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/patches/missing-tests.diff create mode 100644 debian/patches/series create mode 100644 debian/python-ofxparse.docs create mode 100644 debian/python3-ofxparse.docs create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ae82b87 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-ofxhome (0.3.1-1) unstable; urgency=low + + * Initial release. + + -- Clint Adams Tue, 25 Feb 2014 13:03:49 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..f5dc48b --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: python-ofxhome +Section: python +Priority: optional +Maintainer: Clint Adams +Build-Depends: debhelper (>= 9) + , dh-python + , python-all (>= 2.7~) + , python-setuptools +Standards-Version: 3.9.5 +Homepage: https://github.com/captin411/ofxhome +X-Python-Version: >= 2.6 + +Package: python-ofxhome +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Description: ofxhome.com financial institution lookup REST client + ofxhome is a REST client for the web service provided by ofxhome.com. + . + ofxhome.com provides a way to discover the Open Financial Exchange + (OFX) URLs and financial institution IDs for banks and other + financial institutions. + . + ofxhome is a sort of "DNS" for financial institution OFX URLs and + IDs. + . + This client by itself is not all that useful unless you are coupling + it with software that needs this lookup capability. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..550ccf8 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ofxhome +Source: https://pypi.python.org/pypi/ofxhome + +Files: * +Copyright: 2012 David Bartle +License: Expat + +Files: debian/* +Copyright: 2014 Clint Adams +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/patches/missing-tests.diff b/debian/patches/missing-tests.diff new file mode 100644 index 0000000..76b1fe8 --- /dev/null +++ b/debian/patches/missing-tests.diff @@ -0,0 +1,162 @@ +--- /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 --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..25693fd --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +missing-tests.diff diff --git a/debian/python-ofxparse.docs b/debian/python-ofxparse.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/python-ofxparse.docs @@ -0,0 +1 @@ +README diff --git a/debian/python3-ofxparse.docs b/debian/python3-ofxparse.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/python3-ofxparse.docs @@ -0,0 +1 @@ +README diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..59d5e7d --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +#export DH_VERBOSE=1 +export PYBUILD_NAME=ofxhome + + +%: + dh $@ --with python2 --buildsystem=pybuild diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..95bac16 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=uversionmangle=s/(rc|dev|a|b|c)/~$1/ \ + https://pypi.python.org/packages/source/o/ofxhome/ofxhome-(.*)\.(?:tar\.gz|zip|tar\.bz2) -- cgit v1.2.3