Fix test
This commit is contained in:
parent
be18b2c4c7
commit
678e064cfe
|
|
@ -123,8 +123,6 @@ class NewContentBlockMutationTest(TestCase):
|
|||
self.assertEqual(content.get('type'), 'image_url_block')
|
||||
self.assertEqual(content.get('value'), {'url': '/test.png'})
|
||||
|
||||
|
||||
@skip("TODO: Fix this test")
|
||||
def test_updateLastModuleLevel(self):
|
||||
self.assertIsNone(self.user.last_module_level, None)
|
||||
|
||||
|
|
@ -132,7 +130,8 @@ class NewContentBlockMutationTest(TestCase):
|
|||
moduleLevel1 = ModuleLevelFactory(name='2. Lehrjahr')
|
||||
|
||||
mutation = """
|
||||
mutation ($input: UpdateLastModuleLevelInput!){updateLastModuleLevel(input: $input) {
|
||||
mutation ($input: UpdateLastModuleLevelInput!) {
|
||||
updateLastModuleLevel(input: $input) {
|
||||
clientMutationId
|
||||
user {
|
||||
username
|
||||
|
|
@ -141,9 +140,11 @@ class NewContentBlockMutationTest(TestCase):
|
|||
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'))
|
||||
|
||||
updated_user = User.objects.get(id=self.user.id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue