forked from sergioteula/python-amazon-paapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7376c22
commit 677859f
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |