Пример #1
0
 def setUp(self):
     super(ManagerTest, self).setUp()
     self.client = client.Client(username=self.TEST_USER,
                                 token=self.TEST_TOKEN,
                                 tenant_name=self.TEST_TENANT_NAME,
                                 auth_url='http://127.0.0.1:5000',
                                 endpoint='http://127.0.0.1:5000')
     self.mgr = base.Manager(self.client)
     self.mgr.resource_class = base.Resource
Пример #2
0
    def setUp(self):
        super(ManagerTest, self).setUp()

        auth = v2.Token(auth_url='http://127.0.0.1:5000',
                        token=self.TEST_TOKEN)
        session_ = session.Session(auth=auth)
        self.client = client.Client(session=session_)._adapter

        self.mgr = base.Manager(self.client)
        self.mgr.resource_class = base.Resource
Пример #3
0
    def setUp(self):
        super(ManagerTest, self).setUp()

        # Creating a Client not using session is deprecated.
        with self.deprecations.expect_deprecations_here():
            self.client = client.Client(token=self.TEST_TOKEN,
                                        auth_url='http://127.0.0.1:5000',
                                        endpoint='http://127.0.0.1:5000')

        self.mgr = base.Manager(self.client)
        self.mgr.resource_class = base.Resource
Пример #4
0
 def __init__(self, client):
     self._client = client
     self.mgr = base.Manager(self._client)