def testPmid2Doi(self): self.sess.add(Identifier(1, 'doi', 'id')) self.sess.add(Medline(2, 'MEDLINE', 'Journal', 'PubDate', date.today())) self.sess.commit() self.assertEqual('id', Identifier.pmid2doi(1)) self.assertEqual(None, Identifier.pmid2doi(2))
def testPmid2Doi(self): self.sess.add(Identifier(1, 'doi', 'id')) self.sess.add(DefaultCitation(2)) self.sess.commit() self.assertEqual('id', Identifier.pmid2doi(1)) self.assertEqual(None, Identifier.pmid2doi(2))