'Test that looking up either an ID or a string in the resource class
cache for a standardized resource class does not result in a DB
call.'

@mock.patch('sqlalchemy.select')
def test_rc_cache_std_no_db(self, sel_mock):

    cache = rc_cache.ResourceClassCache(self.context)
    self.assertEqual('VCPU', cache.string_from_id(0))
    self.assertEqual('MEMORY_MB', cache.string_from_id(1))
    self.assertEqual(0, cache.id_from_string('VCPU'))
    self.assertEqual(1, cache.id_from_string('MEMORY_MB'))
    self.assertFalse(sel_mock.called)
