'Tests that blocks that were storing published_date and published_by through CMSBlockMixin are loaded correctly'

def test_migrate_published_info(self):

    location = Location('edX', 'migration', '2012_Fall', 'html', 'test_html')
    published_date = datetime(1970, 1, 1, tzinfo=UTC)
    published_by = 123
    self.draft_store._update_single_item(as_draft(location), {'definition.data': {}, 'metadata': {'published_date': list(published_date.timetuple()), 'published_by': published_by}}, allow_not_found=True)
    component = self.draft_store.get_item(location)
    self.assertEqual(component.published_on, published_date)
    self.assertEqual(component.published_by, published_by)
