diff --git a/bookwyrm/models/book.py b/bookwyrm/models/book.py index f1f20830..6a1a18b1 100644 --- a/bookwyrm/models/book.py +++ b/bookwyrm/models/book.py @@ -91,7 +91,7 @@ class Book(BookDataModel): @property def alt_text(self): ''' image alt test ''' - text = '%s cover' % self.title + text = '%s' % self.title if self.edition_info: text += ' (%s)' % self.edition_info return text diff --git a/bookwyrm/tests/models/test_book_model.py b/bookwyrm/tests/models/test_book_model.py index 98d6d446..b4a099d0 100644 --- a/bookwyrm/tests/models/test_book_model.py +++ b/bookwyrm/tests/models/test_book_model.py @@ -81,7 +81,7 @@ class Book(TestCase): book.save() self.assertEqual(book.edition_info, 'worm, Glorbish language, 2020') self.assertEqual( - book.alt_text, 'Test Edition cover (worm, Glorbish language, 2020)') + book.alt_text, 'Test Edition (worm, Glorbish language, 2020)') def test_get_rank(self): diff --git a/bookwyrm/tests/models/test_status_model.py b/bookwyrm/tests/models/test_status_model.py index c6911b6d..29be5c07 100644 --- a/bookwyrm/tests/models/test_status_model.py +++ b/bookwyrm/tests/models/test_status_model.py @@ -150,7 +150,7 @@ class Status(TestCase): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_comment_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -177,7 +177,7 @@ class Status(TestCase): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_quotation_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -207,7 +207,7 @@ class Status(TestCase): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_review_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -238,7 +238,7 @@ class Status(TestCase): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_favorite(self, _): ''' fav a status '''