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('value'), {'url': '/test.png'})
|
||||
|
||||
|
||||
@skip("TODO: Fix this test")
|
||||
def test_updateLastModuleLevel(self):
|
||||
self.assertIsNone(self.user.last_module_level, None)
|
||||
|
||||
moduleLevel= ModuleLevelFactory(name='1. Lehrjahr')
|
||||
moduleLevel = ModuleLevelFactory(name='1. Lehrjahr')
|
||||
moduleLevel1 = ModuleLevelFactory(name='2. Lehrjahr')
|
||||
|
||||
mutation = """
|
||||
mutation ($input: UpdateLastModuleLevelInput!){updateLastModuleLevel(input: $input) {
|
||||
clientMutationId
|
||||
user {
|
||||
username
|
||||
lastModuleLevel {
|
||||
name
|
||||
id
|
||||
}
|
||||
}
|
||||
}}
|
||||
mutation ($input: UpdateLastModuleLevelInput!) {
|
||||
updateLastModuleLevel(input: $input) {
|
||||
clientMutationId
|
||||
user {
|
||||
username
|
||||
lastModuleLevel {
|
||||
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'))
|
||||
|
||||
updated_user = User.objects.get(id=self.user.id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue