c5f1a4a Move find_user_by_email and create_user to User model

Authored and Committed by cqi 6 years ago
    Move find_user_by_email and create_user to User model
    
    Tests are added.
    
    commit_on_success decorator is added and used for calling commit and
    rollback conveniently.
    
    Signed-off-by: Chenxiong Qi <cqi@redhat.com>
    
        
file modified
+12 -27
file modified
+35 -0
file modified
+27 -0