mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 01:20:35 +00:00
inventaire remote id test
This commit is contained in:
parent
b6071da3fc
commit
6ee1a628b0
1 changed files with 8 additions and 0 deletions
|
@ -306,3 +306,11 @@ class Inventaire(TestCase):
|
||||||
|
|
||||||
extract = self.connector.get_description({"enwiki": "test_path"})
|
extract = self.connector.get_description({"enwiki": "test_path"})
|
||||||
self.assertEqual(extract, "hi hi")
|
self.assertEqual(extract, "hi hi")
|
||||||
|
|
||||||
|
def test_remote_id_from_model(self):
|
||||||
|
"""figure out a url from an id"""
|
||||||
|
obj = models.Author.objects.create(name="hello", inventaire_id="123")
|
||||||
|
self.assertEqual(
|
||||||
|
self.connector.get_remote_id_from_model(obj),
|
||||||
|
"https://inventaire.io?action=by-uris&uris=123",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue