Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.77 KB

File metadata and controls

52 lines (31 loc) · 1.77 KB

Testing

Run automated tests of the whole app with pytest.

environment

There are some environment variables you might want for testing.

These are env vars so you can test with real names

Private tests

Its really, really useful to run tests on specific records. But that also raises some privacy issues, because specific records identify real people.

The .gitignore file ignores anything under a private/ directory. So you can put tests under a private/ directory that won't get checked into source control.

Grammars

One of the core functions of this project is to parse criminal records dockets.

Some of the parsers user Context Free Grammars.

Grammars need to be tested on lots of different source documents. The tests include tests that will try to parse all the dockets in a folder tests/data/[summaries|dockets]. If you want those tests to be meaningful, you need to put dockets there.

You could do this manually by downloading dockets and saving them there. You can also use a helper script that randomly generates docket numbers and then uses [natev/DocketScraperAPI](https://hub.docker.com/r/natev/docketscraper_api) to download those dockets. To do this

  1. download and run the DocketScraperAPI image with docker run -p 5000:8800 natev/docketscraper_api
  2. in this project environment, run download (summaries | dockets) [-n = 1]

Frontend

Run just the frontend tests with yarn test. Frontend test coverage is very, very minimal so far.