Beispiel #1
0
    def handleResponse(self, environment, start_response):
        status = "200 OK"
        headers = [('Content-Type', 'application/ofx')]
        start_response(status, headers)
        if environment.has_key("wsgi.input"):
            request_body = environment["wsgi.input"].read()

            if request_body.find("<ACCTTYPE>CHECKING") != -1:
                return ofx_test_utils.get_checking_stmt()
            elif request_body.find("<ACCTTYPE>SAVINGS") != -1:
                return ofx_test_utils.get_savings_stmt()
            else:
                return ofx_test_utils.get_creditcard_stmt()
        else:
            return ofx_test_utils.get_creditcard_stmt()
Beispiel #2
0
 def handleResponse(self, environment, start_response):
     status  = "200 OK"
     headers = [('Content-Type', 'application/ofx')]
     start_response(status, headers)
     if environment.has_key("wsgi.input"):
         request_body = environment["wsgi.input"].read()
         
         if request_body.find("<ACCTTYPE>CHECKING") != -1:
             return ofx_test_utils.get_checking_stmt()
         elif request_body.find("<ACCTTYPE>SAVINGS") != -1:
             return ofx_test_utils.get_savings_stmt()
         else:
             return ofx_test_utils.get_creditcard_stmt()
     else:
         return ofx_test_utils.get_creditcard_stmt()
Beispiel #3
0
 def setUp(self):
     self.port = 9486
     self.server = MockOfxServer(port=self.port)
     self.mockurl = "http://localhost:" + str(self.port) + "/"
     self.institution = ofx.Institution(ofx_org="Test Bank",
                                        ofx_fid="99999",
                                        ofx_url=self.mockurl)
     self.checking_account = ofx.Account(acct_number="1122334455",
                                         aba_number="12345678",
                                         acct_type="Checking",
                                         institution=self.institution)
     self.savings_account = ofx.Account(acct_number="1122334455",
                                        aba_number="12345678",
                                        acct_type="Savings",
                                        institution=self.institution)
     self.creditcard_account = ofx.Account(acct_number="1122334455",
                                           aba_number="12345678",
                                           acct_type="Credit Card",
                                           institution=self.institution)
     self.username = "******"
     self.password = "******"
     self.client = ofx.Client()
     self.checking_stmt = ofx_test_utils.get_checking_stmt()
     self.savings_stmt = ofx_test_utils.get_savings_stmt()
     self.creditcard_stmt = ofx_test_utils.get_creditcard_stmt()
Beispiel #4
0
 def setUp(self):
     self.port    = 9486
     self.server  = MockOfxServer(port=self.port)
     self.mockurl = "http://localhost:" + str(self.port) + "/"
     self.institution = ofx.Institution(ofx_org="Test Bank", 
                                        ofx_fid="99999",
                                        ofx_url=self.mockurl)
     self.checking_account = ofx.Account(acct_number="1122334455", 
                                         aba_number="12345678", 
                                         acct_type="Checking",
                                         institution=self.institution)
     self.savings_account = ofx.Account(acct_number="1122334455", 
                                        aba_number="12345678", 
                                        acct_type="Savings",
                                        institution=self.institution)
     self.creditcard_account = ofx.Account(acct_number="1122334455", 
                                           aba_number="12345678", 
                                           acct_type="Credit Card",
                                           institution=self.institution)
     self.username = "******"
     self.password = "******"
     self.client  = ofx.Client()
     self.checking_stmt = ofx_test_utils.get_checking_stmt()
     self.savings_stmt = ofx_test_utils.get_savings_stmt()
     self.creditcard_stmt = ofx_test_utils.get_creditcard_stmt()
Beispiel #5
0
 def setUp(self):
     parser = ofx.Parser()
     checking_stmt = ofx_test_utils.get_checking_stmt()
     creditcard_stmt = ofx_test_utils.get_creditcard_stmt()
     blank_memo_stmt = ofx_test_utils.get_blank_memo_stmt()
     self.checkparse = parser.parse(checking_stmt)
     self.creditcardparse = parser.parse(creditcard_stmt)
     self.blank_memoparse = parser.parse(blank_memo_stmt)
Beispiel #6
0
 def setUp(self):
     self.server = MockOfxServer()
     self.success = ofx_test_utils.get_creditcard_stmt()
Beispiel #7
0
 def setUp(self):
     self.server = MockOfxServer()
     self.success = ofx_test_utils.get_creditcard_stmt()
Beispiel #8
0
 def setUp(self):
     parser = ofx.Parser()
     checking_stmt = ofx_test_utils.get_checking_stmt()
     creditcard_stmt = ofx_test_utils.get_creditcard_stmt()
     self.checkparse = parser.parse(checking_stmt)
     self.creditcardparse = parser.parse(creditcard_stmt)