mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Fixes openlibrary connector test
This commit is contained in:
parent
502e235e59
commit
7faf639758
1 changed files with 6 additions and 0 deletions
|
@ -192,9 +192,15 @@ class Openlibrary(TestCase):
|
|||
self.assertEqual(edition['key'], '/books/OL9788823M')
|
||||
|
||||
|
||||
@responses.activate
|
||||
def test_create_edition_from_data(self):
|
||||
''' okay but can it actually create an edition with proper metadata '''
|
||||
work = models.Work.objects.create(title='Hello')
|
||||
responses.add(
|
||||
responses.GET,
|
||||
'https://openlibrary.org/authors/OL382982A',
|
||||
json={'hi': 'there'},
|
||||
status=200)
|
||||
result = self.connector.create_edition_from_data(
|
||||
work, self.edition_data)
|
||||
self.assertEqual(result.parent_work, work)
|
||||
|
|
Loading…
Reference in a new issue