mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-25 19:13:57 +03:00
Improved Django tests
This commit is contained in:
parent
e14f1fdd34
commit
6673582e9d
|
@ -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'
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
SECRET_KEY = 1
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'graphql.contrib.django',
|
||||
'graphene.contrib.django',
|
||||
'tests.starwars_django',
|
||||
'tests.contrib_django',
|
||||
]
|
||||
|
||||
DATABASES={
|
||||
|
|
Loading…
Reference in New Issue
Block a user