Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def testAddEmptyEntryFromEmptyString(self):
     _id = BiBlerWrapper.addEntry('')
     self.assertIsNotNone(_id, 'empty entry not added.')
     self.assertEqual(self.ui.getEntryCount(), 1, 'empty entry not added.')
Exemplo n.º 4
0
 def testAddValidBibTeX(self):
     for e in oracle.valid_bibtex_variants:
         _id = BiBlerWrapper.addEntry(e.getBibTeX())
         self.assertIsNotNone(_id, '%s not added.' % e)
Exemplo n.º 5
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.exportString(self, data, ExportFormat.HTML)
Exemplo n.º 6
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.getBibTeX(self, data)
Exemplo n.º 7
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.importStringForReLiS(self, data,
                                               ImportFormat.ENDNOTE)
Exemplo n.º 8
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.createEntryForReLiS(self, data)
Exemplo n.º 9
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.previewEntry(self, data)