everypolitician / scraper_test

Data-driven scraper tests for Scraped
0 stars 0 forks source link

Enable testing of subset of data #13

Open ondenman opened 7 years ago

ondenman commented 7 years ago

Problem

Sometimes, it may be preferable to test only a subset of the data returned by a scraper class.

Example

In the case of a page that consists of a list of member rows, it would be preferable to test a single row.

This test, tests a single member row on a page. Currently, it requires a separate test file.

Fix

'scraper_test' should be extended to allow filtering by a specific field -- without the need for explicit test files. An id could be specified in the .yml so that only the subset of that data with the matching id would be test.

Steps