Skip to content

Added .env file and filtering tests #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

erik-sn
Copy link
Contributor

@erik-sn erik-sn commented Apr 19, 2017

This implements a .env file for the developer to define environment variables. It adds an extra step to set up & configuration but gives the flexibility to define local development & production builds.

I also refactored the filtering tests and plan to add view/serializer tests in the future (plus travis/CI support).

erik-sn added 3 commits April 18, 2017 18:00
set docker-compose.yml env_file field on the web service. This points at a
.env file in the root directory to receive environment variables. The main
purpose use case is to allow for separate configurations in development and
production, and to keep secrets out of the git repository.

additionally this allows for the modified manage.py file to read these
variables so the application can be run outside of a docker container. The
primary use case for this, although it can be done with docker-compose, is
to run tests:

  python manage.py test --settings=api.config.settings
added separate test settings file. This allows for inheriting the
default settings while overriding any configuration needed for the
test suite, for example databases.

Removed existing filter tests (were pointing at non-existant methods)
and added tests to cover current filtering functionality.

Due to environment & manage.py refactor these tests can be run outside
of a docker container:

    python manage.py test --settings=api.config.test_settings
@meatballs meatballs merged commit f86d820 into Axelrod-Python:master Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants