mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-20 08:31:07 +00:00
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
|
@property
|
||||||
def alt_text(self):
|
def alt_text(self):
|
||||||
''' image alt test '''
|
''' image alt test '''
|
||||||
text = '%s cover' % self.title
|
text = '%s' % self.title
|
||||||
if self.edition_info:
|
if self.edition_info:
|
||||||
text += ' (%s)' % self.edition_info
|
text += ' (%s)' % self.edition_info
|
||||||
return text
|
return text
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Book(TestCase):
|
||||||
book.save()
|
book.save()
|
||||||
self.assertEqual(book.edition_info, 'worm, Glorbish language, 2020')
|
self.assertEqual(book.edition_info, 'worm, Glorbish language, 2020')
|
||||||
self.assertEqual(
|
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):
|
def test_get_rank(self):
|
||||||
|
|
|
@ -150,7 +150,7 @@ class Status(TestCase):
|
||||||
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
|
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
|
||||||
(settings.DOMAIN, self.book.cover.url))
|
(settings.DOMAIN, self.book.cover.url))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity['attachment'][0].name, 'Test Edition cover')
|
activity['attachment'][0].name, 'Test Edition')
|
||||||
|
|
||||||
def test_comment_to_activity(self, _):
|
def test_comment_to_activity(self, _):
|
||||||
''' subclass of the base model version with a "pure" serializer '''
|
''' 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' % \
|
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
|
||||||
(settings.DOMAIN, self.book.cover.url))
|
(settings.DOMAIN, self.book.cover.url))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity['attachment'][0].name, 'Test Edition cover')
|
activity['attachment'][0].name, 'Test Edition')
|
||||||
|
|
||||||
def test_quotation_to_activity(self, _):
|
def test_quotation_to_activity(self, _):
|
||||||
''' subclass of the base model version with a "pure" serializer '''
|
''' 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' % \
|
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
|
||||||
(settings.DOMAIN, self.book.cover.url))
|
(settings.DOMAIN, self.book.cover.url))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity['attachment'][0].name, 'Test Edition cover')
|
activity['attachment'][0].name, 'Test Edition')
|
||||||
|
|
||||||
def test_review_to_activity(self, _):
|
def test_review_to_activity(self, _):
|
||||||
''' subclass of the base model version with a "pure" serializer '''
|
''' 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' % \
|
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
|
||||||
(settings.DOMAIN, self.book.cover.url))
|
(settings.DOMAIN, self.book.cover.url))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity['attachment'][0].name, 'Test Edition cover')
|
activity['attachment'][0].name, 'Test Edition')
|
||||||
|
|
||||||
def test_favorite(self, _):
|
def test_favorite(self, _):
|
||||||
''' fav a status '''
|
''' fav a status '''
|
||||||
|
|
Loading…
Reference in a new issue