mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-28 02:50:38 +00:00
Add connector to tested fields on search result
This commit is contained in:
parent
c8d031e311
commit
8ffb22291a
1 changed files with 2 additions and 0 deletions
|
@ -31,6 +31,7 @@ class BookWyrmConnector(TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_format_search_result(self):
|
def test_format_search_result(self):
|
||||||
|
''' create a SearchResult object from search response json '''
|
||||||
datafile = pathlib.Path(__file__).parent.joinpath(
|
datafile = pathlib.Path(__file__).parent.joinpath(
|
||||||
'../data/fr_search.json')
|
'../data/fr_search.json')
|
||||||
search_data = json.loads(datafile.read_bytes())
|
search_data = json.loads(datafile.read_bytes())
|
||||||
|
@ -43,3 +44,4 @@ class BookWyrmConnector(TestCase):
|
||||||
self.assertEqual(result.key, 'https://example.com/book/122')
|
self.assertEqual(result.key, 'https://example.com/book/122')
|
||||||
self.assertEqual(result.author, 'Susanna Clarke')
|
self.assertEqual(result.author, 'Susanna Clarke')
|
||||||
self.assertEqual(result.year, 2017)
|
self.assertEqual(result.year, 2017)
|
||||||
|
self.assertEqual(result.connector, self.connector)
|
||||||
|
|
Loading…
Reference in a new issue