mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-19 22:56:38 +00:00
Removes start reading with progress test
There's no way to do this from the ui???? I don't tihnk there ever was???
This commit is contained in:
parent
a00fdc6864
commit
625ab46059
1 changed files with 3 additions and 11 deletions
|
@ -57,7 +57,6 @@ class ReadThrough(TestCase):
|
||||||
"/start-reading/{}".format(self.edition.id),
|
"/start-reading/{}".format(self.edition.id),
|
||||||
{
|
{
|
||||||
"start_date": "2020-11-27",
|
"start_date": "2020-11-27",
|
||||||
"progress": 50,
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -66,15 +65,8 @@ class ReadThrough(TestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
readthroughs[0].start_date, datetime(2020, 11, 27, tzinfo=timezone.utc)
|
readthroughs[0].start_date, datetime(2020, 11, 27, tzinfo=timezone.utc)
|
||||||
)
|
)
|
||||||
self.assertEqual(readthroughs[0].progress, 50)
|
|
||||||
self.assertEqual(readthroughs[0].finish_date, None)
|
self.assertEqual(readthroughs[0].finish_date, None)
|
||||||
|
|
||||||
progress_updates = readthroughs[0].progressupdate_set.all()
|
|
||||||
self.assertEqual(len(progress_updates), 1)
|
|
||||||
self.assertEqual(progress_updates[0].mode, models.ProgressMode.PAGE)
|
|
||||||
self.assertEqual(progress_updates[0].progress, 50)
|
|
||||||
self.assertEqual(delay_mock.call_count, 1)
|
|
||||||
|
|
||||||
# Update progress
|
# Update progress
|
||||||
self.client.post(
|
self.client.post(
|
||||||
"/edit-readthrough",
|
"/edit-readthrough",
|
||||||
|
@ -87,9 +79,9 @@ class ReadThrough(TestCase):
|
||||||
progress_updates = (
|
progress_updates = (
|
||||||
readthroughs[0].progressupdate_set.order_by("updated_date").all()
|
readthroughs[0].progressupdate_set.order_by("updated_date").all()
|
||||||
)
|
)
|
||||||
self.assertEqual(len(progress_updates), 2)
|
self.assertEqual(len(progress_updates), 1)
|
||||||
self.assertEqual(progress_updates[1].mode, models.ProgressMode.PAGE)
|
self.assertEqual(progress_updates[0].mode, models.ProgressMode.PAGE)
|
||||||
self.assertEqual(progress_updates[1].progress, 100)
|
self.assertEqual(progress_updates[0].progress, 100)
|
||||||
|
|
||||||
# Edit doesn't publish anything
|
# Edit doesn't publish anything
|
||||||
self.assertEqual(delay_mock.call_count, 1)
|
self.assertEqual(delay_mock.call_count, 1)
|
||||||
|
|
Loading…
Reference in a new issue