Moved all the examples from tests to examples

This commit is contained in:
Syrus Akbary 2015-10-27 23:56:24 -07:00
parent f4c1e711cc
commit 3bc0f5f8eb
22 changed files with 16 additions and 14 deletions

2
.gitignore vendored
View File

@ -59,3 +59,5 @@ docs/_build/
# PyBuilder # PyBuilder
target/ target/
/tests/django.sqlite

View File

@ -49,8 +49,8 @@ result = schema.execute(query)
If you want to learn even more, you can also check the following examples: If you want to learn even more, you can also check the following examples:
* Relay Schema: [Starwars Relay example](tests/starwars_relay) * Relay Schema: [Starwars Relay example](examples/starwars_relay)
* Django: [Starwars Django example](tests/starwars_django) * Django: [Starwars Django example](examples/starwars_django)
## Contributing ## Contributing

View File

@ -1,6 +1,6 @@
from .schema import Schema, Query from ..schema import Schema, Query
from graphql.core import graphql from graphql.core import graphql
from .data import setup from ..data import setup
setup() setup()

View File

View File

@ -1,9 +1,9 @@
import pytest import pytest
from graphql.core import graphql from graphql.core import graphql
from .models import * from ..models import *
from .schema import schema from ..schema import schema
from .data import initialize from ..data import initialize
pytestmark = pytest.mark.django_db pytestmark = pytest.mark.django_db

View File

@ -1,9 +1,9 @@
import pytest import pytest
from pytest import raises from pytest import raises
from graphql.core import graphql from graphql.core import graphql
from .data import initialize from ..data import initialize
from .schema import schema from ..schema import schema
pytestmark = pytest.mark.django_db pytestmark = pytest.mark.django_db

View File

View File

@ -1,5 +1,5 @@
from .schema import schema from ..schema import schema
from .data import setup from ..data import setup
setup() setup()

View File

@ -1,5 +1,5 @@
from .schema import schema from ..schema import schema
from .data import setup from ..data import setup
setup() setup()

View File

@ -2,7 +2,7 @@ SECRET_KEY = 1
INSTALLED_APPS = [ INSTALLED_APPS = [
'graphene.contrib.django', 'graphene.contrib.django',
'tests.starwars_django', 'examples.starwars_django',
'tests.contrib_django', 'tests.contrib_django',
] ]