From 0fca47f197935ec3b23e9936229b509733aa098e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Tue, 16 Jan 2018 01:41:07 +0100 Subject: [PATCH] Fix schema tests. --- openlobby/core/tests/snapshots/snap_test_schema.py | 4 ++-- openlobby/core/tests/test_schema.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openlobby/core/tests/snapshots/snap_test_schema.py b/openlobby/core/tests/snapshots/snap_test_schema.py index 748cb1f..3059621 100644 --- a/openlobby/core/tests/snapshots/snap_test_schema.py +++ b/openlobby/core/tests/snapshots/snap_test_schema.py @@ -7,6 +7,6 @@ from snapshottest import Snapshot snapshots = Snapshot() -snapshots['test_login_shortcuts 1'] = b'{"data":{"loginShortcuts":[{"id":"TG9naW5TaG9ydGN1dDoyMA==","name":"bar"}]}}' - snapshots['test_login_shortcuts__none 1'] = b'{"data":{"loginShortcuts":[]}}' + +snapshots['test_login_shortcuts 1'] = b'{"data":{"loginShortcuts":[{"id":"TG9naW5TaG9ydGN1dDoyMA==","name":"bar"}]}}' diff --git a/openlobby/core/tests/test_schema.py b/openlobby/core/tests/test_schema.py index 3eb6fbb..cdbca3c 100644 --- a/openlobby/core/tests/test_schema.py +++ b/openlobby/core/tests/test_schema.py @@ -5,8 +5,8 @@ from ..models import OpenIdClient @pytest.mark.django_db def test_login_shortcuts(client, snapshot): - OpenIdClient.objects.create(id=10, name='foo') - OpenIdClient.objects.create(id=20, name='bar', is_shortcut=True) + OpenIdClient.objects.create(id=10, name='foo', issuer='foo') + OpenIdClient.objects.create(id=20, name='bar', issuer='bar', is_shortcut=True) res = client.post('/graphql', {'query': """ query { loginShortcuts { -- GitLab