fix unit tests

This commit is contained in:
Christian Cueni 2018-10-16 15:54:40 +02:00
parent d67f41f32b
commit 0adaedafb6
1 changed files with 31 additions and 2 deletions

View File

@ -24,7 +24,21 @@ class NewContentBlockMutationTest(TestCase):
def test_add_new_content_block(self):
self.assertEqual(ContentBlock.objects.count(), 1)
mutation = get_graphql_mutation('addContentBlock.gql')
mutation = """
mutation AddContentBlock($input: AddContentBlockInput!) {
addContentBlock(input: $input) {
newContentBlock {
id
title
slug
contents
type
}
errors
clientMutationId
}
}
"""
title = "Hello World"
@ -59,7 +73,21 @@ class NewContentBlockMutationTest(TestCase):
def test_addNewContentBlock_withImageUrlBlock(self):
self.assertEqual(ContentBlock.objects.count(), 1)
mutation = get_graphql_mutation('addContentBlock.gql')
mutation = """
mutation AddContentBlock($input: AddContentBlockInput!) {
addContentBlock(input: $input) {
newContentBlock {
id
title
slug
contents
type
}
errors
clientMutationId
}
}
"""
title = "Hello World"
@ -67,6 +95,7 @@ class NewContentBlockMutationTest(TestCase):
'input': {
"contentBlock": {
"title": title,
"type": "NORMAL",
"contents": [
{
"type": "image_url_block",