Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andkon/cookietester
Testing cookie repo.
https://github.com/andkon/cookietester
Last synced: 4 days ago
JSON representation
Testing cookie repo.
- Host: GitHub
- URL: https://github.com/andkon/cookietester
- Owner: andkon
- License: bsd-3-clause
- Created: 2015-12-22T02:44:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-22T02:59:15.000Z (about 9 years ago)
- Last Synced: 2024-12-31T16:43:02.387Z (17 days ago)
- Language: Python
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
cookietester
==============================Tester proj.
LICENSE: BSD
Settings
------------Moved to settings_.
.. _settings: http://cookiecutter-django.readthedocs.org/en/latest/settings.html
Basic Commands
--------------Setting Up Your Users
^^^^^^^^^^^^^^^^^^^^^To create a **normal user account**, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.
To create an **superuser account**, use this command::
$ python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
Test coverage
^^^^^^^^^^^^^To run the tests, check your test coverage, and generate an HTML coverage report::
$ coverage run manage.py test
$ coverage html
$ open htmlcov/index.htmlLive reloading and Sass CSS compilation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Moved to `Live reloading and SASS compilation`_.
.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.org/en/latest/live-reloading-and-sass-compilation.html
Celery
^^^^^^This app comes with Celery.
To run a celery worker:
.. code-block:: bash
cd cookietester
celery -A cookietester.taskapp worker -l infoPlease note: For Celerys import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right.
It's time to write the code!!!
Running end to end integration tests
------------------------------------N.B. The integration tests will not run on Windows.
To install the test runner::
$ pip install hitch
To run the tests, enter the cookietester/tests directory and run the following commands::
$ hitch init
Then run the stub test::
$ hitch test stub.test
This will download and compile python, postgres and redis and install all python requirements so the first time it runs it may take a while.
Subsequent test runs will be much quicker.
The testing framework runs Django, Celery (if enabled), Postgres, HitchSMTP (a mock SMTP server), Firefox/Selenium and Redis.
Deployment
----------We providing tools and instructions for deploying using Docker and Heroku.
Heroku
^^^^^^.. image:: https://www.herokucdn.com/deploy/button.png
:target: https://heroku.com/deploySee detailed `cookiecutter-django Heroku documentation`_.
.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.org/en/latest/deployment-on-heroku.html
Docker
^^^^^^See detailed `cookiecutter-django Docker documentation`_.
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.org/en/latest/deployment-with-docker.html