Improved Django tests

This commit is contained in:
Syrus Akbary 2015-09-30 00:11:40 -07:00
parent e14f1fdd34
commit 6673582e9d
2 changed files with 4 additions and 21 deletions

View File

@ -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'

View File

@ -1,8 +1,9 @@
SECRET_KEY = 1
INSTALLED_APPS = [
'graphql.contrib.django',
'graphene.contrib.django',
'tests.starwars_django',
'tests.contrib_django',
]
DATABASES={