Fix unit tests
This commit is contained in:
parent
9fb8e13c1c
commit
e45847fe1e
|
|
@ -39,20 +39,88 @@ class MyAssignemntsText(DefaultUserTestCase):
|
||||||
|
|
||||||
def query_my_assignments(self):
|
def query_my_assignments(self):
|
||||||
query = '''
|
query = '''
|
||||||
query {
|
query MyActivityQuery {
|
||||||
myActivity {
|
myActivity {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
text
|
title
|
||||||
assignment {
|
slug
|
||||||
|
metaTitle
|
||||||
|
mySubmissions {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
assignment {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myAnswers {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
survey {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myContentBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
uuid
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
contentBlock {
|
||||||
|
id
|
||||||
|
type
|
||||||
|
contents
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myChapterBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
chapter {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
description
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bookmark {
|
||||||
id
|
id
|
||||||
title
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
module {
|
||||||
|
id
|
||||||
|
teaser
|
||||||
|
metaTitle
|
||||||
|
intro
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
result = self.client.execute(query)
|
result = self.client.execute(query)
|
||||||
|
|
@ -68,5 +136,5 @@ class MyAssignemntsText(DefaultUserTestCase):
|
||||||
result = self.query_my_assignments()
|
result = self.query_my_assignments()
|
||||||
contents = self.get_content(result)
|
contents = self.get_content(result)
|
||||||
self.assertEqual(len(contents), 1)
|
self.assertEqual(len(contents), 1)
|
||||||
self.assertEquals(contents[0].get('node').get('text'), self.submission1.text)
|
self.assertEquals(contents[0].get('node').get('mySubmissions').get('edges')[0].get('node').get('text'), self.submission1.text)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue