def test_get_tenant_quotas_arg(self):

        quota_driver = driver.DbQuotaDriver()
        ctx = context.Context('', 'bar')

        foo_quotas = {'network': 5}
        default_quotas = {'network': 10}
        target_tenant = 'foo'

        with mock.patch.object(driver.DbQuotaDriver,
                               'get_tenant_quotas',
                               return_value=foo_quotas) as get_tenant_quotas:

            quotas = quota_driver._get_quotas(ctx,
                                              target_tenant,
                                              default_quotas)

            self.assertEqual(quotas, foo_quotas)
            get_tenant_quotas.assert_called_once_with(ctx,
                                                      default_quotas,
                                                      target_tenant)
Call neutron.db.quota.driver.DbQuotaDriver._get_quotas.
dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/extensions/test_quotasv2.py/TestDbQuotaDriver.test_get_tenant_quotas_arg