From 7b9f2736cbeb63e638bb623a1d57799c94f8482a Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Wed, 7 Dec 2016 08:17:24 -0600 Subject: [PATCH 1/6] Add db.sqlite3 to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 55c10a8..8046ca9 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,4 @@ ENV/ # Rope project settings .ropeproject /db.sqlite3 +/src/db.sqlite3 From 941c6490f2f6c59974d2b666bcdfadbec920f5dd Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Wed, 7 Dec 2016 10:17:45 -0600 Subject: [PATCH 2/6] Adds sample todos test --- deps/testing.txt | 3 ++- src/todos/tests.py | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/deps/testing.txt b/deps/testing.txt index 0283891..b64dc2e 100644 --- a/deps/testing.txt +++ b/deps/testing.txt @@ -1 +1,2 @@ -prospector \ No newline at end of file +prospector +coverage \ No newline at end of file diff --git a/src/todos/tests.py b/src/todos/tests.py index 7ce503c..6ee1917 100644 --- a/src/todos/tests.py +++ b/src/todos/tests.py @@ -1,3 +1,20 @@ -from django.test import TestCase +from django.contrib.auth.models import User +from django.test import TestCase, RequestFactory +from .models import TodoModel + # Create your tests here. +class TodoTestCase(TestCase): + def setUp(self): + self.user = User.objects.create_user( + username='test_user', + first_name='test', + last_name='user', + email='test@user.com', + password='top_secret' + ) + + TodoModel.objects.create(user=self.user, text="roar") + + def test_animals_can_speak(self): + todo = TodoModel.objects.get(text="roar") From c80b812b02a21fe9bbf734ccd4c79fd98338330a Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Thu, 8 Dec 2016 09:07:47 -0600 Subject: [PATCH 3/6] Renames class to end with test so django test runner picks it up. --- src/todos/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/todos/tests.py b/src/todos/tests.py index 6ee1917..be04377 100644 --- a/src/todos/tests.py +++ b/src/todos/tests.py @@ -4,7 +4,7 @@ # Create your tests here. -class TodoTestCase(TestCase): +class TodoTest(TestCase): def setUp(self): self.user = User.objects.create_user( username='test_user', From bcb115f751369e9bd2c044b4c808b2b62ce9ae73 Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Thu, 8 Dec 2016 09:08:50 -0600 Subject: [PATCH 4/6] Adds circle.yml for contentious integration --- circle.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..ff4f568 --- /dev/null +++ b/circle.yml @@ -0,0 +1,11 @@ +machine: + python: + version: 3.5.2 +dependencies: + post: + - pip install -r ./deps/testing.txt +test: + pre: + - ./src/manage.py collectstatic --no-input + override: + - ./src/manage.py test ./src \ No newline at end of file From 94c6ef2a49aff0bbf0830d72ffd4dc0197eecacf Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Thu, 8 Dec 2016 09:11:32 -0600 Subject: [PATCH 5/6] Removes collect static command from testing step --- circle.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/circle.yml b/circle.yml index ff4f568..b564ac8 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,5 @@ dependencies: post: - pip install -r ./deps/testing.txt test: - pre: - - ./src/manage.py collectstatic --no-input override: - ./src/manage.py test ./src \ No newline at end of file From 672002d83adf5826d19fb1ab9515125b12de9a18 Mon Sep 17 00:00:00 2001 From: Nicholas Romero Date: Thu, 8 Dec 2016 10:00:39 -0600 Subject: [PATCH 6/6] Freezes dependencies for first release --- deps/base.txt | 8 ++++---- deps/prod.txt | 6 +++--- deps/testing.txt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deps/base.txt b/deps/base.txt index 08bc269..dea4df8 100644 --- a/deps/base.txt +++ b/deps/base.txt @@ -1,4 +1,4 @@ -django -graphene-django -django-filter -django-environ +Django==1.10.3 +graphene-django==1.2.0 +django-filter==1.0.1 +django-environ==0.4.1 \ No newline at end of file diff --git a/deps/prod.txt b/deps/prod.txt index 2804d2f..e4d50d4 100644 --- a/deps/prod.txt +++ b/deps/prod.txt @@ -1,4 +1,4 @@ -r base.txt -psycopg2 -waitress -whitenoise \ No newline at end of file +psycopg2==2.6.2 +waitress==1.0.1 +whitenoise==3.2.2 \ No newline at end of file diff --git a/deps/testing.txt b/deps/testing.txt index b64dc2e..253d8b3 100644 --- a/deps/testing.txt +++ b/deps/testing.txt @@ -1,2 +1,2 @@ -prospector -coverage \ No newline at end of file +prospector==0.12.4 +coverage==4.2 \ No newline at end of file