From 7faf639758127ccbc48a990fe81714eb0dc59c08 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 3 Feb 2021 12:52:13 -0800 Subject: [PATCH] Fixes openlibrary connector test --- bookwyrm/tests/connectors/test_openlibrary_connector.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bookwyrm/tests/connectors/test_openlibrary_connector.py b/bookwyrm/tests/connectors/test_openlibrary_connector.py index c277ba04..8132a203 100644 --- a/bookwyrm/tests/connectors/test_openlibrary_connector.py +++ b/bookwyrm/tests/connectors/test_openlibrary_connector.py @@ -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)