コード例 #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')
コード例 #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)
コード例 #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.')
コード例 #4
0
 def testAddValidBibTeX(self):
     for e in oracle.valid_bibtex_variants:
         _id = BiBlerWrapper.addEntry(e.getBibTeX())
         self.assertIsNotNone(_id, '%s not added.' % e)
コード例 #5
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.exportString(self, data, ExportFormat.HTML)
コード例 #6
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.getBibTeX(self, data)
コード例 #7
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.importStringForReLiS(self, data,
                                               ImportFormat.ENDNOTE)
コード例 #8
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.createEntryForReLiS(self, data)
コード例 #9
0
 def POST(self, code):
     data = urllib.parse.unquote_plus(web.data().decode())
     return BiBlerWrapper.previewEntry(self, data)