'Given a block structure, a block usage key, and a list of keyword
arguments representing XBlock fields, verify that the block structure
has the specified values for each XBlock field.'

def assert_collected_xblock_fields(self, block_structure, usage_key, **expectations):

    self.assertGreater(len(expectations), 0)
    for field in expectations:
        self.longMessage = True
        self.assertEqual(expectations[field], block_structure.get_xblock_field(usage_key, field), msg=u'in    field    {},'.format(repr(field)))
    self.assertIsNotNone(block_structure.get_xblock_field(usage_key, u'subtree_edited_on'))
