'Test for backward compatibility with an essex/folsom bug.
Non-indexed attributes were returned in an \'extra\' attribute, instead
of on the entity itself; for consistency and backwards compatibility,
those attributes should be included twice.
This behavior is specific to the SQL driver.'

def test_update_project_returns_extra(self):

    arbitrary_key = uuid.uuid4().hex
    arbitrary_value = uuid.uuid4().hex
    project = unit.new_project_ref(domain_id=CONF.identity.default_domain_id)
    project[arbitrary_key] = arbitrary_value
    ref = self.resource_api.create_project(project['id'], project)
    self.assertEqual(arbitrary_value, ref[arbitrary_key])
    self.assertIsNone(ref.get('extra'))
    ref['name'] = uuid.uuid4().hex
    ref = self.resource_api.update_project(ref['id'], ref)
    self.assertEqual(arbitrary_value, ref[arbitrary_key])
    self.assertEqual(arbitrary_value, ref['extra'][arbitrary_key])
