'Tests that public/unpublish doesn\'t affect connected stored asides'

@ddt.data((ModuleStoreEnum.Type.mongo, 1, 0), (ModuleStoreEnum.Type.split, 2, 0))
@XBlockAside.register_temp_plugin(AsideFoo, 'test_aside1')
@patch('xmodule.modulestore.split_mongo.caching_descriptor_system.CachingDescriptorSystem.applicable_aside_types', (lambda self, block: ['test_aside1']))
@ddt.unpack
def test_published_and_unpublish_item_with_asides(self, default_store, max_find, max_send):

    if (default_store == ModuleStoreEnum.Type.mongo):
        raise SkipTest('asides    not    supported    in    old    mongo')
    self.initdb(default_store)
    block_type1 = 'test_aside1'
    def_id = self.runtime.id_generator.create_definition(block_type1)
    usage_id = self.runtime.id_generator.create_usage(def_id)
    aside1 = AsideFoo(scope_ids=ScopeIds('user', block_type1, def_id, usage_id), runtime=self.runtime)
    aside1.field11 = 'new_value11'
    aside1.field12 = 'new_value12'
    def _check_asides(item):
        '    Helper    function    to    check    asides    '
        asides = item.runtime.get_asides(item)
        self.assertEquals(asides[0].field11, 'new_value11')
        self.assertEquals(asides[0].field12, 'new_value12')
    item = self.store.create_child(self.user_id, self.writable_chapter_location, 'problem', 'test_compute_publish_state', asides=[aside1])
    item_location = item.location
    with check_mongo_calls(max_find, max_send):
        self.assertFalse(self.store.has_published_version(item))
    _check_asides(item)
    published_block = self.store.publish(item_location, self.user_id)
    _check_asides(published_block)
    item = self.store.get_item(item_location)
    self.assertTrue(self.store.has_published_version(item))
    _check_asides(item)
    unpublished_block = self.store.unpublish(item_location, self.user_id)
    _check_asides(unpublished_block)
    item = self.store.get_item(item_location)
    self.assertFalse(self.store.has_published_version(item))
    _check_asides(item)
