Fix unit test

This commit is contained in:
Ramon Wenger 2022-01-30 17:41:25 +01:00
parent a626fd9d04
commit b84c9c2d68
1 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ from notes.models import Note, ModuleBookmark, ChapterBookmark
class NoteMutationTestCase(TestCase):
def setUp(self):
self.module = ModuleFactory()
self.module = ModuleFactory(slug='some-module-slug')
self.chapter = Chapter(title='Hello')
self.module.add_child(instance=self.chapter)
self.user = user = UserFactory(username='aschi')
@ -53,8 +53,9 @@ class NewNoteMutationTestCase(NoteMutationTestCase):
result = self.client.execute(self.add_mutation, variables={
'input': {
'note': {
'parent': to_global_id('ModuleNode', self.module.pk),
'text': text
'parent': self.module.slug,
'text': text,
'type': 'module'
}
}
})