Fix test
This commit is contained in:
parent
be18b2c4c7
commit
678e064cfe
|
|
@ -123,27 +123,28 @@ class NewContentBlockMutationTest(TestCase):
|
||||||
self.assertEqual(content.get('type'), 'image_url_block')
|
self.assertEqual(content.get('type'), 'image_url_block')
|
||||||
self.assertEqual(content.get('value'), {'url': '/test.png'})
|
self.assertEqual(content.get('value'), {'url': '/test.png'})
|
||||||
|
|
||||||
|
|
||||||
@skip("TODO: Fix this test")
|
|
||||||
def test_updateLastModuleLevel(self):
|
def test_updateLastModuleLevel(self):
|
||||||
self.assertIsNone(self.user.last_module_level, None)
|
self.assertIsNone(self.user.last_module_level, None)
|
||||||
|
|
||||||
moduleLevel= ModuleLevelFactory(name='1. Lehrjahr')
|
moduleLevel = ModuleLevelFactory(name='1. Lehrjahr')
|
||||||
moduleLevel1 = ModuleLevelFactory(name='2. Lehrjahr')
|
moduleLevel1 = ModuleLevelFactory(name='2. Lehrjahr')
|
||||||
|
|
||||||
mutation = """
|
mutation = """
|
||||||
mutation ($input: UpdateLastModuleLevelInput!){updateLastModuleLevel(input: $input) {
|
mutation ($input: UpdateLastModuleLevelInput!) {
|
||||||
clientMutationId
|
updateLastModuleLevel(input: $input) {
|
||||||
user {
|
clientMutationId
|
||||||
username
|
user {
|
||||||
lastModuleLevel {
|
username
|
||||||
name
|
lastModuleLevel {
|
||||||
id
|
name
|
||||||
}
|
id
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
result = self.client.execute(mutation, variables={"input": {"id": moduleLevel1.id}})
|
module_level_gql_id = to_global_id('ModuleLevelNode', moduleLevel1.pk)
|
||||||
|
result = self.client.execute(mutation, variables={"input": {"id": module_level_gql_id}})
|
||||||
self.assertIsNone(result.get('errors'))
|
self.assertIsNone(result.get('errors'))
|
||||||
|
|
||||||
updated_user = User.objects.get(id=self.user.id)
|
updated_user = User.objects.get(id=self.user.id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue