Exemplo n.º 1
0
 def test__manager(self):
     admin = mock.MagicMock(neutron=mock.Mock(return_value="foo"))
     res = resources.NeutronQuota(admin=admin, tenant_uuid="fake")
     res._manager()
     self.assertEqual("foo", getattr(admin, res._service)())
Exemplo n.º 2
0
 def test_delete(self, mock_manager):
     user = mock.MagicMock()
     resources.NeutronQuota(user=user, tenant_uuid="fake").delete()
     mock_manager().delete_quota.assert_called_once_with("fake")