Ran into a issue where a REST API I was testing didn't always preserve order when presenting json arrays.
Sometimes you would get
{ "users":["Tim", "Scott"] }
others you'd get
{ "users":["Scott", "Tim"]}
This made using the json_expectations unreliable. The wildcard helps to alleviate this issue
Were the tests updated?
added a couple of tests for this functionality. For some reason scripts/install wouldn't work on my machine but .venv/bin/py.test -s tests/test_json_expectations.py worked like a charm.
What's this PR do?
Adds the ability to use a wildcard for an array index when using json expectations. Now you can do
Where should the reviewer start?
alarmageddon/validations/json_expectations.py
How should this be manually tested?
scripts/install
Any background context you want to provide?
Ran into a issue where a REST API I was testing didn't always preserve order when presenting json arrays. Sometimes you would get
others you'd get
This made using the json_expectations unreliable. The wildcard helps to alleviate this issue
Were the tests updated?
added a couple of tests for this functionality. For some reason
scripts/install
wouldn't work on my machine but.venv/bin/py.test -s tests/test_json_expectations.py
worked like a charm.