From 6673582e9dbed9fc618bb287e079b38e67c9df04 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 30 Sep 2015 00:11:40 -0700 Subject: [PATCH] Improved Django tests --- tests/contrib_django/models.py | 22 ++-------------------- tests/django_settings.py | 3 ++- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/tests/contrib_django/models.py b/tests/contrib_django/models.py index ab37eaf8..dac0258a 100644 --- a/tests/contrib_django/models.py +++ b/tests/contrib_django/models.py @@ -1,19 +1,4 @@ from __future__ import absolute_import -import django -from django.conf import settings - -settings.configure( - DATABASES={ - 'INSTALLED_APPS': [ - 'graphql.contrib.django', - ], - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': 'db_test.sqlite', - } - } -) - from django.db import models class Reporter(models.Model): @@ -25,7 +10,7 @@ class Reporter(models.Model): return "%s %s" % (self.first_name, self.last_name) class Meta: - app_label = 'graphql' + app_label = 'contrib_django' class Article(models.Model): headline = models.CharField(max_length=100) @@ -37,7 +22,4 @@ class Article(models.Model): class Meta: ordering = ('headline',) - app_label = 'graphql' - - -django.setup() + app_label = 'contrib_django' diff --git a/tests/django_settings.py b/tests/django_settings.py index 4f1bf8ce..faa4c15d 100644 --- a/tests/django_settings.py +++ b/tests/django_settings.py @@ -1,8 +1,9 @@ SECRET_KEY = 1 INSTALLED_APPS = [ - 'graphql.contrib.django', + 'graphene.contrib.django', 'tests.starwars_django', + 'tests.contrib_django', ] DATABASES={