andela / ah-infinity-stones

BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

#161966915 User Profiles #35

Closed leonardnjura closed 5 years ago

leonardnjura commented 5 years ago

What does this PR do?

Description of Task to be completed?

Setup postgres test database

How should this be manually tested?

$ git clone -b ch-test-delete-update-notifications2-161966897 https://github.com/andela/ah-infinity-stones then $ cd ah-infinity-stones

Create and activate virtual env virtualenv -p python3 venv $ source venv/bin/activate $ pip3 install -r requirements.txt to install the dependencies Setup environment variables. Copy all from below and paste them into the .env file. Update the values to your choice: Register user via $ python3 manage.py createsuperuser --username john --email john.doe@example.com Check Inbox Login and access restricted endpoints POST http://127.0.0.1:8000/api/users/login/ GET http://127.0.0.1:8000/api/profiles/ GET http://127.0.0.1:8000/api/profiles/?page=2 GET http://127.0.0.1:8000/api/profiles/u GET PUT http://127.0.0.1:8000/api/profiles/

export DATABASE_USER='user'
export DATABASE_PASSWORD='xxx'
export HOST='localhost'
export PORT='5432'
export DATABASE_TEST='ah_test'

 export EMAIL_HOST_USER='sendgrid_username'
 export EMAIL_HOST_PASSWORD='sendgrid_pswd'

Activate the env variables by $source .env Run migrations: $ python3 manage.py migrate Run tests - $ python3 manage.py test

What are the relevant pivotal tracker stories?

#161966915

Screenshots

screen shot 2018-12-11 at 16 32 31 screen shot 2018-12-13 at 14 28 56 screen shot 2018-12-13 at 14 29 04 screen shot 2018-12-13 at 14 29 09 screen shot 2018-12-13 at 14 29 13
codeclimate[bot] commented 5 years ago

Code Climate has analyzed commit 181f661c and detected 11 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 11

View more on Code Climate.