Closed Chetco closed 10 years ago
Also make sure you run pep8 against files you've touched before you make a PR.
r?
I added some more comments and tests should be written for the functions you've created.
@dean r?
So Model was moved to models.py because init_db had a small import hack to avoid an import error. I also created a separate utility module, util_validation.py, because I was not able to import util.py without a cyclic import. This will also help the seperation of util.py in the future. The check for duplicate username is done by exception handling to avoid race conditions.
I've tested initdb and register functions which appear to work as desired. @brutal-chaos r? dean recommends someone else besides myself test this PR as well.
Since this was going to became a bit of a hassle, I rebased this with current develop and opened a new PR, #94. Closing as we should move to that one.
Added a module for validating user input, moved the location of orvsd_central.database.Model to orvsd_central.models.Model, and added tests to general.register() which the function itself still needs to be tested for correctness.