Skip to content

Commit

Permalink
Added test for get_browser_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioteula committed Jan 15, 2022
1 parent 7376c22 commit 677859f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_api_get_browse_nodes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import unittest
from unittest import mock

from amazon_paapi import AmazonApi, models
from amazon_paapi.helpers import requests


class TestGetBrowseNodes(unittest.TestCase):
@mock.patch.object(requests, "get_browse_nodes_response")
def test_search_items(self, mocked_get_browse_nodes_response):
mocked_response = []
mocked_get_browse_nodes_response.return_value = mocked_response
amazon = AmazonApi("key", "secret", "tag", "ES")
response = amazon.get_browse_nodes(['ABCDEFGHIJ'])
self.assertTrue(isinstance(response, list))

0 comments on commit 677859f

Please sign in to comment.