Closed JosiahRegencia closed 6 years ago
Hi Josiah, I reviewed the PR. This is a good first pass at the logic. However for testing purposes we should focus on the GET
and CREATE
API endpoints. For instance:
CREATE
to insert multiple test entries into the DB. For example, use this API endpoint: https://github.com/Doveps/mono/blob/master/savant/app/results.py#L10
CREATE
test cases, for example this: https://github.com/Doveps/mono/blob/master/savant/tests/test_basic.py#L11GET
to retrieve the same entries from the DB. For example, use this API endpoint: https://github.com/Doveps/mono/blob/master/savant/app/results.py#L77
GET
CREATE
once with 5 records, and CREATE
again with the same 5, the count at the end should be 5. If it is instead 10, our test would now catch that error.Let me know if you have questions, we can do a video chat if you want.
I initialized the null test case. Got confused along the way as to how to implement it. Created a new branch null-testcase
Here is the test case:
https://github.com/Doveps/mono/blob/7bbaa21f5b8365ed508e084db2f67b0e07b950e8/savant/tests/test_basic.py#L43-L50
I based it from this:
https://github.com/Doveps/mono/blob/7bbaa21f5b8365ed508e084db2f67b0e07b950e8/savant/app/query.py#L161-L176
What it does is it searches for any repetition in the DB. If it returns an empty list, then it passes.
I could add more details in the testing. Just wanted to make sure first I'm on the right track.