https://github.com/adityaprakash-bobby/py-tdd
[WIP] An approach towards test driven development in Python.
https://github.com/adityaprakash-bobby/py-tdd
aws django fabric gunicorn-web-server selenium tdd-python testing web-application
Last synced: about 2 months ago
JSON representation
[WIP] An approach towards test driven development in Python.
- Host: GitHub
- URL: https://github.com/adityaprakash-bobby/py-tdd
- Owner: adityaprakash-bobby
- License: gpl-3.0
- Created: 2019-04-06T11:59:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T21:30:17.000Z (almost 5 years ago)
- Last Synced: 2026-01-03T18:48:33.159Z (5 months ago)
- Topics: aws, django, fabric, gunicorn-web-server, selenium, tdd-python, testing, web-application
- Language: Python
- Homepage: http://staging.adityaprakash.gq
- Size: 373 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# py-tdd
A very minimal application made on Django, in order to deliver a heavily tested and automatically deployed To-Do lists webapp.
> "Always obey the Testing Goat."
### Get it running locally
```bash
git clone https://github.com/adityaprakash-bobby/py-tdd
cd py-tdd/
# setup a virtual environment
python3 -m venv virtualenv
# prep the dev server
./virtualenv/bin/pip install -r requirements.txt
# start the dev server
./virtualenv/bin/python manage.py runserver
# run tests
# e2e test:
./virtualenv/bin/python manage.py test functional_tests
# unit tests:
./virtualenv/bin/python manage.py test lists
```
### Get it running in the web
I am using an EC2 machine as my deployment server inorder to get my site published. Got a free domain registered at [freenom.com](https://my.freenom.com/). And using a **nginx + gunicorn** setup for the deployment of the staging and live server. I will be uploading the deployment settings soon.
> you can follow the guide in `deploy_tools`
#### Using fabric CLI
This will be very specific to deployment to AWS EC2 servers. We assume that you already have the `private_key` file used to log in to your remote machine. It will be used the same way you use it for logging into EC2 instances. You have to provides the username and host address of the instance.
```bash
cd /path/to/your/local/git/repo/
source virtualenv/bin/activate
cd deploy_tools/
fab -i /path/to/private_key.pem deploy:host=username@host_address
```