Closed cmoiceanu closed 11 years ago
Looks good, just a couple recommendations:
auth/tests/test_auth
; probably just need one set of tests for that functionality.Initially I held back on the refactoring to using base test class because I was not entirely convinced I’ll have it working right (my lack of understanding python and Django in general). I have applied tests case refactoring and they all work fine. I will submit cleaner package shortly.
Fundamentally yes, we both test that user login, but we are taking different approaches. In my case for login/logout I actually check that user is in (or not in) the current session. I wanted to preserve this technique somehow (took me a while to figure it out). More tests will not hurt, and I did not want to remove your test from its location. As you have also noticed, I centralized tests to a single location, I do not want to impose this on anybody else but I prefer that test code is clustered together (which also makes refactoring of reusable test case code more intuitive).
Refactored test cases are in
Looks alright. merging.
Adding tests cases for different areas • Create House • Add House Members • User Login/Logout • Password Change, • Password Recovery • Create Announcement • Create Task * • Etc…
*Indicates there are a few snags than need to be sorted out to make the test do what it needs to do. I wanted the check these in anyway as the majority of the test setup is already in place and making it work will require a lot less work.
This check-in requires that you rerun
pip –r install requirements
to pick up the coverage toolset.To run the entire test with coverage: In the root of ‘fullhouse’ execute
all_tests.sh
script, when this script completes it generates the test coverage numbers.As you add new functionality, it might be useful to run this entire suite of tests to see if the exiting functionality still works. If you add functionality that breaks an existing test case, you might consider updating the test case to reflect the changes. The plan here is to continue adding more test cases and to improve the coverage. I think right now we are slightly above 60% coverage, but that doesn’t mean squat, need to have more tests for many more cases.