Skip to content
Snippets Groups Projects
Commit 502e98d1 authored by jan.bednarik's avatar jan.bednarik
Browse files

Viewer schema tests.

parent baf0ad8b
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_unauthenticated 1'] = {
'data': {
'viewer': None
}
}
import pytest
from openlobby.core.models import User
pytestmark = pytest.mark.django_db
@pytest.fixture(autouse=True)
def setup():
User.objects.create(id=1, is_author=True, username='a', openid_uid='TheWolf',
first_name='Winston', last_name='Wolfe', email='winston@wolfe.com')
def test_unauthenticated(client, snapshot):
res = client.post('/graphql', {'query': """
query {
viewer {
openidUid
firstName
lastName
email
}
}
"""})
snapshot.assert_match(res.json())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment