def testing_external_year(self): # Create new file with open("testingBib.bib", 'w') as outfile: outfile.write('@Book{gG07,' + 'year = 2007' '}') path = os.getcwd() + "/testingBib.bib" bibContent = aws_polly_render.parse_bib_file(path) self.assertTrue( self._docsEqual( bibContent, "<emphasis level='strong'> References Section </emphasis> <break time='1s'/> Bibliography item is read as: <break time='0.5s'/>gG07. Type: book<break time='0.5s'/> year: 2007<break time='0.3s'/>" )) os.remove("testingBib.bib")
def testing_external_bib_file(self): # Create new file with open("testingBib.bib", 'w') as outfile: outfile.write('@Book{gG07,' + 'author = "Gratzer, George A.",' + 'title = "More Math Into LaTeX",' + 'publisher = "Birkhauser",' + 'address = "Boston",' + 'year = 2007,' + 'edition = "4th"' + '}') path = os.getcwd() + "/testingBib.bib" bibContent = aws_polly_render.parse_bib_file(path) self.assertTrue( self._docsEqual( bibContent, "<emphasis level='strong'> References Section </emphasis> <break time='1s'/> Bibliography item is read as: <break time='0.5s'/>gG07. Type: book<break time='0.5s'/> Authors: Gratzer, George A., <break time='0.3s'/> title: More Math Into LaTeX<break time='0.3s'/>publisher: Birkhauser<break time='0.3s'/>address: Boston<break time='0.3s'/>year: 2007<break time='0.3s'/>edition: 4th<break time='0.3s'/>" )) os.remove("testingBib.bib")