Commit 3e8892c1 authored by David Haynes's avatar David Haynes
Browse files

Basics for local unit testing

- including a test that always passes and ensuring you can run it
parent 9e8dc36e
from django.test import TestCase
from go.models import URL, RegisteredUser
class URLTestCase(TestCase):
def test_Django_Test(self):
self.assertEqual("Hello World!", "Hello World!")
...@@ -42,6 +42,23 @@ ...@@ -42,6 +42,23 @@
login_user={{ mysql['root_user'] }} login_user={{ mysql['root_user'] }}
login_password={{ mysql['root_pass'] }} login_password={{ mysql['root_pass'] }}
- name: give mysql user access to test db
mysql_user: >
name={{ mysql['user'] }}
login_password={{ mysql['root_pass'] }}
login_user={{ mysql['root_user'] }}
priv=test_{{ mysql['db'] }}.*:ALL
- name: create test mysql database
mysql_db: >
name={{ mysql['db'] }}_test
login_user={{ mysql['root_user'] }}
login_password={{ mysql['root_pass'] }}
- name: install site packages to virtual env - name: install site packages to virtual env
pip: > pip: >
requirements={{ django['requirements_path'] }} requirements={{ django['requirements_path'] }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment