forked from mirrors/bookwyrm
Merge pull request #695 from mouse-reeve/cover-alt-text
Removes the word "cover" from cover alt text
This commit is contained in:
commit
79c3ae1c44
3 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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 '''
|
||||
|
|
Loading…
Reference in a new issue