Full add author flow
This commit is contained in:
parent
b2d1384bc5
commit
5c089db086
5 changed files with 96 additions and 57 deletions
|
@ -85,18 +85,7 @@ class BookViews(TestCase):
|
|||
|
||||
def test_edit_book_add_author(self):
|
||||
''' lets a user edit a book '''
|
||||
view = views.EditBook.as_view()
|
||||
self.local_user.groups.add(self.group)
|
||||
form = forms.EditionForm(instance=self.book)
|
||||
form.data['title'] = 'New Title'
|
||||
form.data['last_edited_by'] = self.local_user.id
|
||||
form.data['add_author'] = "John Doe"
|
||||
request = self.factory.post('', form.data)
|
||||
request.user = self.local_user
|
||||
with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'):
|
||||
view(request, self.book.id)
|
||||
self.book.refresh_from_db()
|
||||
self.assertEqual(self.book.title, 'New Title')
|
||||
# TODO
|
||||
|
||||
|
||||
def test_switch_edition(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue