update tests.py and views.py