Merge branch 'main' into book-file-links
This commit is contained in:
@ -231,11 +231,12 @@ class ReadingViews(TestCase):
|
||||
"finish_date": "2018-03-07",
|
||||
"book": self.book.id,
|
||||
"id": "",
|
||||
"user": self.local_user.id,
|
||||
},
|
||||
)
|
||||
request.user = self.local_user
|
||||
|
||||
views.create_readthrough(request)
|
||||
views.ReadThrough.as_view()(request)
|
||||
readthrough = models.ReadThrough.objects.get()
|
||||
self.assertEqual(readthrough.start_date.year, 2017)
|
||||
self.assertEqual(readthrough.start_date.month, 1)
|
||||
|
@ -41,10 +41,8 @@ class ReadThrough(TestCase):
|
||||
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
||||
|
||||
self.client.post(
|
||||
"/reading-status/start/{}".format(self.edition.id),
|
||||
{
|
||||
"start_date": "2020-11-27",
|
||||
},
|
||||
f"/reading-status/start/{self.edition.id}",
|
||||
{"start_date": "2020-11-27"},
|
||||
)
|
||||
|
||||
readthroughs = self.edition.readthrough_set.all()
|
||||
@ -62,10 +60,8 @@ class ReadThrough(TestCase):
|
||||
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
||||
|
||||
self.client.post(
|
||||
"/reading-status/start/{}".format(self.edition.id),
|
||||
{
|
||||
"start_date": "2020-11-27",
|
||||
},
|
||||
f"/reading-status/start/{self.edition.id}",
|
||||
{"start_date": "2020-11-27"},
|
||||
)
|
||||
|
||||
readthroughs = self.edition.readthrough_set.all()
|
||||
|
Reference in New Issue
Block a user