Unverified Commit 9ad0dbda authored by David Haynes's avatar David Haynes
Browse files

Fix python3 on a new vagrant box plus test a url

- figured out how to test urls woo
parent 77b12639
Pipeline #853 passed with stage
in 1 minute and 15 seconds
......@@ -3,19 +3,22 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi
# Django Imports
from django.test import TestCase
from django.urls import reverse
# App Imports
from .urls import *
# https://stackoverflow.com/questions/18987051/how-do-i-unit-test-django-urls
"""
Test cases for the urls
"""
class UrlsTest(TestCase):
"""
Default test case, does not actually test anything
/ - Homepage url.
"""
def test_Django_Test(self):
self.assertEqual("Hello World!", "Hello World!")
def test_index(self):
url = reverse('index')
self.assertEqual(url, '/')
# https://stackoverflow.com/questions/18987051/how-do-i-unit-test-django-urls
......@@ -18,11 +18,11 @@
- python3
- python3-dev
- python3-pip
- git
- name: Upgrade pip
pip:
name: pip
state: latest
- name: Move pip
command: mv /usr/bin/pip3 /usr/bin/pip
ignore_errors: true
- name: Install virtualenv
pip:
......@@ -31,12 +31,6 @@
- name: Create the virtualenv
command: virtualenv -p python3 /vagrant/venv
- name: install site packages to virtual env
pip:
requirements: "{{ django['requirements_path'] }}"
virtualenv: "{{ django['venv_path'] }}"
virtualenv_python: /usr/bin/python3
- name: Install go packages
apt:
name: "{{ item }}"
......@@ -50,6 +44,12 @@
- libmysqlclient-dev
- python-mysqldb
- name: install site packages to virtual env
pip:
requirements: "{{ django['requirements_path'] }}"
virtualenv: "{{ django['venv_path'] }}"
virtualenv_python: /usr/bin/python3
- name: create mysql user
mysql_user:
name: "{{ mysql['user'] }}"
......
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