Halo code test
The following instructions will cover useful information to start the Halo Flask Application
create a virtual envirionment using virtualenv
- To install virtualenv use:
pip install virtualenv venv
- To start virtualenv:
- (Windows)
foo\bar\venv\Scripts\activate
-(Mac)
source venv/bin/activate
- Navigate to working directory
- run
pip install -r requirements.txt
- To run the project
- run
python app.py
In terms of testing the API:
- I have written tests to cover most of the applications login/logout functions. Because of time, I was unable to create full tests for checking if a user has permission to view specific data (This functionality is however working in app).
- Run
shell python test.py -v
EndPoint | Description |
---|---|
/login | Sign in as a signed up user |
/logout | Logout User |
/signup | Sign up as new user |
/dashboard | Add a new post as a logged in user |
/posts | Display your posts |
/index | Landing Page - Login Default |