forked from mirrors/bookwyrm
Fixes unit tests
This commit is contained in:
parent
e2f39a1bd5
commit
701be26100
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ class SelfConnector(TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_format_search_result(self):
|
def test_format_search_result(self):
|
||||||
result = self.connector.format_search_result(self.edition)
|
result = self.connector.search('Edition of Example')[0]
|
||||||
self.assertEqual(result.title, 'Edition of Example Work')
|
self.assertEqual(result.title, 'Edition of Example Work')
|
||||||
self.assertEqual(result.key, self.edition.remote_id)
|
self.assertEqual(result.key, self.edition.remote_id)
|
||||||
self.assertEqual(result.author, 'Anonymous')
|
self.assertEqual(result.author, 'Anonymous')
|
||||||
|
|
|
@ -84,7 +84,7 @@ class ImportJob(TestCase):
|
||||||
|
|
||||||
def test_date_read(self):
|
def test_date_read(self):
|
||||||
''' converts to the local shelf typology '''
|
''' converts to the local shelf typology '''
|
||||||
expected = datetime.datetime(2019, 4, 9, 0, 0)
|
expected = datetime.datetime(2019, 4, 12, 0, 0)
|
||||||
item = models.ImportItem.objects.get(index=2)
|
item = models.ImportItem.objects.get(index=2)
|
||||||
self.assertEqual(item.date_read, expected)
|
self.assertEqual(item.date_read, expected)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue