Open greenmoss opened 6 years ago
I don't really understand it totally. The test cases look for the endpoints, don't they?
Endpoints from result.py
Check out the db connection string:
Compare that to the previous two tests. I would like all of the savant tests to go through savant API endpoints.
Made a PR:
I have some minor feedback on #121. Please have a look and update as needed, and I will merge.
For this ticket, please dive a bit deeper with this test. While the API endpoint in #121 does satisfy the conditions, it is not truly "exercising" savant. We want a good test that exercises the null condition. For instance the error condition was "running A + B + C with null resulted in duplicate rows" (if I got that wrong, please correct me). So the test should be "run A + B + C with null, and assert we got a single row".
The PR #121 will be merged, so I will count that as today's report. However please also open a new PR to address my feedback above.
From what I understand about the unit tests is that each function declared is run independently from each other.
That's why I added psycopg2 queries saving null values. Twice. To show that it doesn't repeat. I've been reading this over and over again, and I couldn't really get it. I only have a theory what you actually mean. I think what you want is that we base the null test cases on the scanned results saved to the database. If that's the case, I guess what I can do is to check for rows with null values and then check if they have duplicates. If they don't, tests pass. If they do, tests fail.
Currently the
test_nullcases
test is connecting directly to the database. Create API endoints for savant, and converttest_nullcases
to use them.This will have the nice side effect of getting Travis to pass.