Skip to content

Commit

Permalink
test: fix tests for Journal and Tldr
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnsilva committed Apr 1, 2024
1 parent 96599d3 commit 4303a48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_semanticscholar.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_journal(self) -> None:
self.assertEqual(item.pages, data['pages'])
self.assertEqual(item.volume, data['volume'])
self.assertEqual(item.raw_data, data)
self.assertEqual(str(item), data['name'])
self.assertEqual(str(item), str(data))
self.assertEqual(item['name'], data['name'])
self.assertEqual(item.keys(), data.keys())
file.close()
Expand All @@ -96,7 +96,7 @@ def test_paper(self) -> None:
self.assertEqual(item.influentialCitationCount,
data['influentialCitationCount'])
self.assertEqual(item.isOpenAccess, data['isOpenAccess'])
self.assertEqual(str(item.journal), str(data['journal']['name']))
self.assertEqual(str(item.journal), str(data['journal']))
self.assertEqual(item.openAccessPdf, data['openAccessPdf'])
self.assertEqual(item.paperId, data['paperId'])
self.assertEqual(item.publicationDate, datetime.strptime(
Expand All @@ -107,7 +107,7 @@ def test_paper(self) -> None:
self.assertEqual(str(item.references), str(data['references']))
self.assertEqual(item.s2FieldsOfStudy, data['s2FieldsOfStudy'])
self.assertEqual(item.title, data['title'])
self.assertEqual(str(item.tldr), data['tldr']['text'])
self.assertEqual(str(item.tldr), str(data['tldr']))
self.assertEqual(item.url, data['url'])
self.assertEqual(item.venue, data['venue'])
self.assertEqual(item.year, data['year'])
Expand Down Expand Up @@ -156,7 +156,7 @@ def test_tldr(self) -> None:
self.assertEqual(item.model, data['model'])
self.assertEqual(item.text, data['text'])
self.assertEqual(item.raw_data, data)
self.assertEqual(str(item), data['text'])
self.assertEqual(str(item), str(data))
self.assertEqual(item['model'], data['model'])
self.assertEqual(item.keys(), data.keys())
file.close()
Expand Down

0 comments on commit 4303a48

Please sign in to comment.