mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-11 01:35:28 +00:00
linted
This commit is contained in:
parent
f4da9fbf34
commit
31a78a5c9e
2 changed files with 21 additions and 9 deletions
|
@ -146,7 +146,10 @@ class BookViews(TestCase):
|
|||
rating=3,
|
||||
)
|
||||
|
||||
self.assertIsInstance(models.ReviewRating.objects.get(user=self.local_user, book=edition1), models.ReviewRating)
|
||||
self.assertIsInstance(
|
||||
models.ReviewRating.objects.get(user=self.local_user, book=edition1),
|
||||
models.ReviewRating,
|
||||
)
|
||||
with self.assertRaises(models.ReviewRating.DoesNotExist):
|
||||
models.ReviewRating.objects.get(user=self.local_user, book=edition2)
|
||||
|
||||
|
@ -154,7 +157,10 @@ class BookViews(TestCase):
|
|||
request.user = self.local_user
|
||||
views.switch_edition(request)
|
||||
|
||||
self.assertIsInstance(models.ReviewRating.objects.get(user=self.local_user, book=edition2), models.ReviewRating)
|
||||
self.assertIsInstance(
|
||||
models.ReviewRating.objects.get(user=self.local_user, book=edition2),
|
||||
models.ReviewRating,
|
||||
)
|
||||
with self.assertRaises(models.ReviewRating.DoesNotExist):
|
||||
models.ReviewRating.objects.get(user=self.local_user, book=edition1)
|
||||
|
||||
|
@ -173,10 +179,13 @@ class BookViews(TestCase):
|
|||
user=self.local_user,
|
||||
name="blah",
|
||||
rating=3,
|
||||
content="not bad"
|
||||
content="not bad",
|
||||
)
|
||||
|
||||
self.assertIsInstance(models.Review.objects.get(user=self.local_user, book=edition1), models.Review)
|
||||
self.assertIsInstance(
|
||||
models.Review.objects.get(user=self.local_user, book=edition1),
|
||||
models.Review,
|
||||
)
|
||||
with self.assertRaises(models.Review.DoesNotExist):
|
||||
models.Review.objects.get(user=self.local_user, book=edition2)
|
||||
|
||||
|
@ -184,6 +193,9 @@ class BookViews(TestCase):
|
|||
request.user = self.local_user
|
||||
views.switch_edition(request)
|
||||
|
||||
self.assertIsInstance(models.Review.objects.get(user=self.local_user, book=edition2), models.Review)
|
||||
self.assertIsInstance(
|
||||
models.Review.objects.get(user=self.local_user, book=edition2),
|
||||
models.Review,
|
||||
)
|
||||
with self.assertRaises(models.Review.DoesNotExist):
|
||||
models.Review.objects.get(user=self.local_user, book=edition1)
|
||||
|
|
Loading…
Reference in a new issue