def test_06_parse_real_file_as_token_list(self): """ Parse a real file """ parser = OFXParser(open(self.path+'real_file_no_headers.ofx').read()) print tag = parser._read_tag() while tag is not None: print "%-20s|%-20s|%s " % (tag.get_type_name(), tag.name, tag.value ) tag = parser._read_tag()
def test_06_parse_real_file_as_token_list(self): """ Parse a real file """ parser = OFXParser(open(self.path + 'real_file_no_headers.ofx').read()) print tag = parser._read_tag() while tag is not None: print "%-20s|%-20s|%s " % (tag.get_type_name(), tag.name, tag.value) tag = parser._read_tag()
def test_02_opening_tag_file(self): ''' Parse a basic set of tokens ''' parser = OFXParser(open(self.path+'opening_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type==tag.TYPE_OPENING) self.assertTrue(tag.name=='STATUS')
def test_02_opening_tag_file(self): ''' Parse a basic set of tokens ''' parser = OFXParser(open(self.path + 'opening_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type == tag.TYPE_OPENING) self.assertTrue(tag.name == 'STATUS')
def test_04_selfclosing_tag_file(self): ''' Parse a basic set of tokens ''' parser = OFXParser(open(self.path+'selfclosing_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type==tag.TYPE_SELFCLOSING) self.assertTrue(tag.name=='CODE') self.assertTrue(tag.value=='this is a value with 1 number and 2 special chars :(')
def test_04_selfclosing_tag_file(self): ''' Parse a basic set of tokens ''' parser = OFXParser(open(self.path + 'selfclosing_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type == tag.TYPE_SELFCLOSING) self.assertTrue(tag.name == 'CODE') self.assertTrue(tag.value == 'this is a value with 1 number and 2 special chars :(')
def test_03_closing_tag_file(self): """Test self closing tag parsing""" parser = OFXParser(open(self.path+'closing_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type==tag.TYPE_CLOSING) self.assertTrue(tag.name=='STATUS')
def test_03_closing_tag_file(self): """Test self closing tag parsing""" parser = OFXParser(open(self.path + 'closing_tag.ofx').read()) tag = parser._read_tag() self.assertTrue(tag.type == tag.TYPE_CLOSING) self.assertTrue(tag.name == 'STATUS')