def testAddWithQuotes(self): settings.Preferences().overrideKeyGeneration = False _id = BiBlerWrapper.addEntry(oracle.valid_entry_bracket.getBibTeX()) bibtex_bracket = self.ui.getBibTeX(_id) _id = BiBlerWrapper.addEntry(oracle.valid_entry_quote.getBibTeX()) bibtex_quote = self.ui.getBibTeX(_id) self.assertEqual(bibtex_bracket, bibtex_quote, 'adding an entry in quotes does not parse correctly')
def testAddInvalidBibTeX(self): for e in oracle.all_invalid_entry_types: _id = BiBlerWrapper.addEntry(e.getBibTeX()) self.assertIsNone(_id, '%s was wrongly added.' % e) self.assertEqual(self.ui.getEntryCount(), 0, '%s wrongly added.' % e)
def testAddEmptyEntryFromEmptyString(self): _id = BiBlerWrapper.addEntry('') self.assertIsNotNone(_id, 'empty entry not added.') self.assertEqual(self.ui.getEntryCount(), 1, 'empty entry not added.')
def testAddValidBibTeX(self): for e in oracle.valid_bibtex_variants: _id = BiBlerWrapper.addEntry(e.getBibTeX()) self.assertIsNotNone(_id, '%s not added.' % e)
def POST(self, code): data = urllib.parse.unquote_plus(web.data().decode()) return BiBlerWrapper.exportString(self, data, ExportFormat.HTML)
def POST(self, code): data = urllib.parse.unquote_plus(web.data().decode()) return BiBlerWrapper.getBibTeX(self, data)
def POST(self, code): data = urllib.parse.unquote_plus(web.data().decode()) return BiBlerWrapper.importStringForReLiS(self, data, ImportFormat.ENDNOTE)
def POST(self, code): data = urllib.parse.unquote_plus(web.data().decode()) return BiBlerWrapper.createEntryForReLiS(self, data)
def POST(self, code): data = urllib.parse.unquote_plus(web.data().decode()) return BiBlerWrapper.previewEntry(self, data)