@mock.patch.object(quota, 'is_qfd_populated')
def test_get_usage_bad_qfd(self, mock_qfd):
    mock_qfd.return_value = False
    resources = ['servers']
    e = self.assertRaises(ValueError, placement_limits._get_usage, self.context, uuids.project, resources)
    self.assertEqual('must first migrate instance mappings', str(e))
@mock.patch.object(quota, 'is_qfd_populated')
def test_get_usage_bad_qfd(self, mock_qfd):
    mock_qfd.return_value = False
    resources = ['servers']
    e = self.assertRaises(ValueError, placement_limits._get_usage, self.context, uuids.project, resources)
    self.assertEqual('must first migrate instance mappings', str(e))