Esempio n. 1
0
 def setUp(self):
     self.port = 9486
     self.server = MockOfxServer(port=self.port)
     self.mockurl = "http://localhost:" + str(self.port) + "/"
     self.institution = Institution(ofx_org="Test Bank",
                                    ofx_fid="99999",
                                    ofx_url=self.mockurl)
     self.checking_account = Account(acct_number="1122334455",
                                     aba_number="12345678",
                                     acct_type="Checking",
                                     institution=self.institution)
     self.savings_account = Account(acct_number="1122334455",
                                    aba_number="12345678",
                                    acct_type="Savings",
                                    institution=self.institution)
     self.creditcard_account = Account(acct_number="1122334455",
                                       aba_number="12345678",
                                       acct_type="Credit Card",
                                       institution=self.institution)
     self.username = "******"
     self.password = "******"
     self.client = Client()
     self.checking_stmt = get_checking_stmt().decode('utf-8')
     self.savings_stmt = get_savings_stmt().decode('utf-8')
     self.creditcard_stmt = get_creditcard_stmt().decode('utf-8')
Esempio n. 2
0
 def setUp(self):
     self.port    = 9486
     self.server  = MockOfxServer(port=self.port)
     self.mockurl = "http://localhost:" + str(self.port) + "/"
     self.institution = Institution(ofx_org="Test Bank",
                                        ofx_fid="99999",
                                        ofx_url=self.mockurl)
     self.checking_account = Account(acct_number="1122334455",
                                         aba_number="12345678", 
                                         acct_type="Checking",
                                         institution=self.institution)
     self.savings_account = Account(acct_number="1122334455",
                                        aba_number="12345678", 
                                        acct_type="Savings",
                                        institution=self.institution)
     self.creditcard_account = Account(acct_number="1122334455",
                                           aba_number="12345678", 
                                           acct_type="Credit Card",
                                           institution=self.institution)
     self.username = "******"
     self.password = "******"
     self.client  = Client()
     self.checking_stmt = get_checking_stmt().decode('utf-8')
     self.savings_stmt = get_savings_stmt().decode('utf-8')
     self.creditcard_stmt = get_creditcard_stmt().decode('utf-8')
Esempio n. 3
0
    def handleResponse(self, environment, start_response):
        status = "200 OK"
        headers = [('Content-Type', 'application/ofx')]
        start_response(status, headers)
        if "wsgi.input" in environment:
            request_body = environment["wsgi.input"].read()

            if request_body.find("<ACCTTYPE>CHECKING".encode('utf-8')) != -1:
                return [get_checking_stmt()]
            elif request_body.find("<ACCTTYPE>SAVINGS".encode('utf-8')) != -1:
                return [get_savings_stmt()]
            else:
                return [get_creditcard_stmt()]
        else:
            return [get_creditcard_stmt()]
    def handleResponse(self, environment, start_response):
        status  = "200 OK"
        headers = [('Content-Type', 'application/ofx')]
        start_response(status, headers)
        if "wsgi.input" in environment:
            request_body = environment["wsgi.input"].read()

            if request_body.find("<ACCTTYPE>CHECKING".encode('utf-8')) != -1:
                return [get_checking_stmt()]
            elif request_body.find("<ACCTTYPE>SAVINGS".encode('utf-8')) != -1:
                return [get_savings_stmt()]
            else:
                return [get_creditcard_stmt()]
        else:
            return [get_creditcard_stmt()]