No more remote id with slug, just add slug in local path.
This commit is contained in:
parent
8838875879
commit
d9ac326c29
10 changed files with 30 additions and 30 deletions
|
@ -89,7 +89,7 @@ class AbstractConnector(TestCase):
|
|||
def test_get_or_create_book_existing(self):
|
||||
"""find an existing book by remote/origin id"""
|
||||
self.assertEqual(models.Book.objects.count(), 1)
|
||||
self.assertEqual(self.book.remote_id, f"https://{DOMAIN}/book/{self.book.id}/s/test-book")
|
||||
self.assertEqual(self.book.remote_id, f"https://{DOMAIN}/book/{self.book.id}")
|
||||
self.assertEqual(self.book.origin_id, "https://example.com/book/1234")
|
||||
|
||||
# dedupe by origin id
|
||||
|
@ -101,9 +101,10 @@ class AbstractConnector(TestCase):
|
|||
result = self.connector.get_or_create_book(
|
||||
f"https://{DOMAIN}/book/{self.book.id}"
|
||||
)
|
||||
|
||||
self.assertEqual(models.Book.objects.count(), 1)
|
||||
self.assertEqual(result, self.book)
|
||||
|
||||
|
||||
@responses.activate
|
||||
def test_get_or_create_book_deduped(self):
|
||||
"""load remote data and deduplicate"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue