fixes import in abstract connector unit test

This commit is contained in:
Mouse Reeve 2020-11-25 11:24:36 -08:00
parent 0ec40ae748
commit 4f6ce0307d

View file

@ -2,8 +2,7 @@
from django.test import TestCase from django.test import TestCase
from bookwyrm import models from bookwyrm import models
from bookwyrm.connectors.abstract_connector import Mapping,\ from bookwyrm.connectors.abstract_connector import Mapping
update_from_mappings
from bookwyrm.connectors.bookwyrm_connector import Connector from bookwyrm.connectors.bookwyrm_connector import Connector
@ -79,7 +78,7 @@ class AbstractConnector(TestCase):
Mapping('physical_format', remote_field='format'), Mapping('physical_format', remote_field='format'),
Mapping('series', formatter=lambda x: x[0]), Mapping('series', formatter=lambda x: x[0]),
] ]
book = update_from_mappings(self.book, data, mappings) book = self.connector.update_from_mappings(self.book, data, mappings)
self.assertEqual(book.title, 'Example Edition') self.assertEqual(book.title, 'Example Edition')
self.assertEqual(book.isbn_10, '1234567890') self.assertEqual(book.isbn_10, '1234567890')
self.assertEqual(book.isbn_13, None) self.assertEqual(book.isbn_13, None)