'Testst that when empty context is pass to children of ConditionalModule it will not raise KeyError.'

@mock.patch('xmodule.conditional_module.ConditionalModule.is_condition_satisfied')
def test_preview_conditional_module_children_context(self, mock_is_condition_satisfied):

    mock_is_condition_satisfied.return_value = True
    client = Client()
    client.login(username=self.user.username, password=self.user_password)
    with self.store.default_store(ModuleStoreEnum.Type.split):
        course = CourseFactory.create()
        conditional_block = ItemFactory.create(parent_location=course.location, category='conditional')
        ItemFactory.create(parent_location=conditional_block.location, category='conditional')
        url = reverse_usage_url('preview_handler', conditional_block.location, kwargs={'handler': 'xmodule_handler/conditional_get'})
        response = client.post(url)
        self.assertEqual(response.status_code, 200)
