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

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 @@
login_user={{ mysql['root_user'] }}
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'] }}
state=present
host=localhost
priv=test_{{ mysql['db'] }}.*:ALL
append_privs=yes
- name: create test mysql database
mysql_db: >
name={{ mysql['db'] }}_test
state=present
login_user={{ mysql['root_user'] }}
login_password={{ mysql['root_pass'] }}
- name: install site packages to virtual env
pip: >
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