Skip to content
Jupiter documentation
Menu

Verify a lane

Run one live search per marketplace with scripts/live_smoke.py and record the replies as test fixtures.

scripts/live_smoke.py runs one live search_offers call per Marketplace and prints one row for each. Use it after you add a key or change a lane.

Run#

The script searches for "wireless mouse", and for "full cream milk 2l" on woolworths, coles and aldi.

The last line names every marketplace that returned neither offers nor a diagnostic. It prints none when the server works as designed.

Record fixtures#

--record writes each upstream reply to tests/fixtures/<marketplace>/NN.json and a summary to tests/fixtures/MANIFEST.json.

The recorder drops query strings and headers. It replaces the value of every configured secret found in a body with REDACTED. A secret is an environment variable of 8 or more characters whose name contains TOKEN, KEY, SECRET, CERT, COOKIES or DATABASE_URL.

Read a recorded file before you commit it. Listings can hold seller names and other personal data.

Mark a lane verified#

  1. Run the script for the marketplace and confirm the outcome is offers.
  2. Record the reply and add a parser test in tests/test_lanes.py that reads the fixture.
  3. Set status="verified" on the lane's LaneSpec in procurement/lanes/__init__.py.
  4. Change the status in docs-src/reference/marketplaces.md and in README.rst.

Source: belikh/procurement HEAD