Added pytest support
Fix bug in shell for models