From 65e9afd2712737991fe9e55dd27d1b6fd23d68d4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 21 Dec 2020 14:54:27 -0800 Subject: [PATCH] Fixes user in outgoing tests --- bookwyrm/tests/test_outgoing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bookwyrm/tests/test_outgoing.py b/bookwyrm/tests/test_outgoing.py index 2bdcb225..2a83d484 100644 --- a/bookwyrm/tests/test_outgoing.py +++ b/bookwyrm/tests/test_outgoing.py @@ -40,7 +40,7 @@ class Outgoing(TestCase): self.shelf = models.Shelf.objects.create( name='Test Shelf', identifier='test-shelf', - user=self.user + user=self.local_user ) @@ -149,7 +149,7 @@ class Outgoing(TestCase): def test_handle_shelve(self): ''' shelve a book ''' with patch('bookwyrm.broadcast.broadcast_task.delay'): - outgoing.handle_shelve(self.user, self.book, self.shelf) + outgoing.handle_shelve(self.local_user, self.book, self.shelf) # make sure the book is on the shelf self.assertEqual(self.shelf.books.get(), self.book) @@ -159,7 +159,7 @@ class Outgoing(TestCase): shelf = models.Shelf.objects.get(identifier='to-read') with patch('bookwyrm.broadcast.broadcast_task.delay'): - outgoing.handle_shelve(self.user, self.book, shelf) + outgoing.handle_shelve(self.local_user, self.book, shelf) # make sure the book is on the shelf self.assertEqual(shelf.books.get(), self.book) @@ -169,7 +169,7 @@ class Outgoing(TestCase): shelf = models.Shelf.objects.get(identifier='reading') with patch('bookwyrm.broadcast.broadcast_task.delay'): - outgoing.handle_shelve(self.user, self.book, shelf) + outgoing.handle_shelve(self.local_user, self.book, shelf) # make sure the book is on the shelf self.assertEqual(shelf.books.get(), self.book) @@ -179,7 +179,7 @@ class Outgoing(TestCase): shelf = models.Shelf.objects.get(identifier='read') with patch('bookwyrm.broadcast.broadcast_task.delay'): - outgoing.handle_shelve(self.user, self.book, shelf) + outgoing.handle_shelve(self.local_user, self.book, shelf) # make sure the book is on the shelf self.assertEqual(shelf.books.get(), self.book) @@ -190,5 +190,5 @@ class Outgoing(TestCase): self.shelf.save() self.assertEqual(self.shelf.books.count(), 1) with patch('bookwyrm.broadcast.broadcast_task.delay'): - outgoing.handle_unshelve(self.user, self.book, self.shelf) + outgoing.handle_unshelve(self.local_user, self.book, self.shelf) self.assertEqual(self.shelf.books.count(), 0)