1
0
Fork 0

Merge branch 'main' into book-file-links

This commit is contained in:
Mouse Reeve 2022-01-12 06:39:22 -08:00 committed by GitHub
commit e6d9895854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 384 additions and 198 deletions

View file

@ -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)

View file

@ -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()