fix unit tests
This commit is contained in:
parent
d67f41f32b
commit
0adaedafb6
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue