From 94a14529e064fc2acf8a328cd4bf1ea70850b4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Thu, 1 Feb 2018 00:55:03 +0100 Subject: [PATCH] Update dummy test data. --- tests/dummy.py | 15 ++++++++++++--- .../schema/snapshots/snap_test_search_reports.py | 12 ++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/dummy.py b/tests/dummy.py index 4ffd4d1..98c6220 100644 --- a/tests/dummy.py +++ b/tests/dummy.py @@ -11,6 +11,13 @@ authors = [ 'first_name': 'Winston', 'last_name': 'Wolfe', }, + { + 'id': 2, + 'username': 'sponge', + 'openid_uid': 'sponge', + 'first_name': 'Spongebob', + 'last_name': 'Squarepants', + }, ] reports = [ @@ -52,9 +59,11 @@ reports = [ def prepare_reports(): - author = User.objects.create(**authors[0]) - for report in reports: - Report.objects.create(author=author, **report) + author1 = User.objects.create(**authors[0]) + author2 = User.objects.create(**authors[1]) + Report.objects.create(author=author1, **reports[0]) + Report.objects.create(author=author2, **reports[1]) + Report.objects.create(author=author1, **reports[2]) def prepare_report(): diff --git a/tests/schema/snapshots/snap_test_search_reports.py b/tests/schema/snapshots/snap_test_search_reports.py index 4943bb1..e8b353b 100644 --- a/tests/schema/snapshots/snap_test_search_reports.py +++ b/tests/schema/snapshots/snap_test_search_reports.py @@ -16,9 +16,9 @@ snapshots['test_all 1'] = { 'node': { 'author': { 'extra': None, - 'firstName': 'Winston', - 'id': 'QXV0aG9yOjE=', - 'lastName': 'Wolfe' + 'firstName': 'Spongebob', + 'id': 'QXV0aG9yOjI=', + 'lastName': 'Squarepants' }, 'body': 'Another long story.', 'date': '2018-01-05 00:00:00+00:00', @@ -95,9 +95,9 @@ snapshots['test_query 1'] = { 'node': { 'author': { 'extra': None, - 'firstName': 'Winston', - 'id': 'QXV0aG9yOjE=', - 'lastName': 'Wolfe' + 'firstName': 'Spongebob', + 'id': 'QXV0aG9yOjI=', + 'lastName': 'Squarepants' }, 'body': 'Another long story.', 'date': '2018-01-05 00:00:00+00:00', -- GitLab