Esempio n. 1
0
def test_find_by_id():
    with requests.session() as session:
        http = HttpCache(session)
        actual, _  = client.find_all_by_page(http, 1)
        product_number = actual['ProductSearchResults'][0]['ProductNumber']
        assert_is_not_none(int(product_number))
Esempio n. 2
0
def test_find_all_by_page():
    with patch.object(HttpCache, 'get', return_value=json_load_config('response_sb.json')):
        actual, _ = client.find_all_by_page(HttpCache(None), 1)
        product_number = actual['ProductSearchResults'][0]['ProductNumber']
        assert_equal(product_number, '8965101')