Fix unit test
This commit is contained in:
parent
a626fd9d04
commit
b84c9c2d68
|
|
@ -13,7 +13,7 @@ from notes.models import Note, ModuleBookmark, ChapterBookmark
|
||||||
|
|
||||||
class NoteMutationTestCase(TestCase):
|
class NoteMutationTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.module = ModuleFactory()
|
self.module = ModuleFactory(slug='some-module-slug')
|
||||||
self.chapter = Chapter(title='Hello')
|
self.chapter = Chapter(title='Hello')
|
||||||
self.module.add_child(instance=self.chapter)
|
self.module.add_child(instance=self.chapter)
|
||||||
self.user = user = UserFactory(username='aschi')
|
self.user = user = UserFactory(username='aschi')
|
||||||
|
|
@ -53,8 +53,9 @@ class NewNoteMutationTestCase(NoteMutationTestCase):
|
||||||
result = self.client.execute(self.add_mutation, variables={
|
result = self.client.execute(self.add_mutation, variables={
|
||||||
'input': {
|
'input': {
|
||||||
'note': {
|
'note': {
|
||||||
'parent': to_global_id('ModuleNode', self.module.pk),
|
'parent': self.module.slug,
|
||||||
'text': text
|
'text': text,
|
||||||
|
'type': 'module'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue