Linting fixes
This commit is contained in:
parent
cf26f48d5c
commit
31883a9f7c
|
@ -88,7 +88,7 @@ class AbstractConnector(TestCase):
|
||||||
"""find an existing book by remote/origin id"""
|
"""find an existing book by remote/origin id"""
|
||||||
self.assertEqual(models.Book.objects.count(), 1)
|
self.assertEqual(models.Book.objects.count(), 1)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.book.remote_id, "https://%s/book/%d" % (DOMAIN, self.book.id)
|
self.book.remote_id, f"https://{DOMAIN}/book/{self.book.id}"
|
||||||
)
|
)
|
||||||
self.assertEqual(self.book.origin_id, "https://example.com/book/1234")
|
self.assertEqual(self.book.origin_id, "https://example.com/book/1234")
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class AbstractConnector(TestCase):
|
||||||
|
|
||||||
# dedupe by remote id
|
# dedupe by remote id
|
||||||
result = self.connector.get_or_create_book(
|
result = self.connector.get_or_create_book(
|
||||||
"https://%s/book/%d" % (DOMAIN, self.book.id)
|
f"https://{DOMAIN}/book/{self.book.id}"
|
||||||
)
|
)
|
||||||
self.assertEqual(models.Book.objects.count(), 1)
|
self.assertEqual(models.Book.objects.count(), 1)
|
||||||
self.assertEqual(result, self.book)
|
self.assertEqual(result, self.book)
|
||||||
|
@ -119,7 +119,8 @@ class AbstractConnector(TestCase):
|
||||||
@responses.activate
|
@responses.activate
|
||||||
def test_get_or_create_author(self):
|
def test_get_or_create_author(self):
|
||||||
"""load an author"""
|
"""load an author"""
|
||||||
self.connector.author_mappings = [ # pylint: disable=attribute-defined-outside-init # pylint: disable=attribute-defined-outside-init
|
# pylint: disable=attribute-defined-outside-init
|
||||||
|
self.connector.author_mappings = [
|
||||||
Mapping("id"),
|
Mapping("id"),
|
||||||
Mapping("name"),
|
Mapping("name"),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue