Ejemplo n.º 1
0
    def setUp(self):
        super(KeypairsTest, self).setUp()
        self.Controller = keypairs.Controller()
        fakes.stub_out_networking(self.stubs)
        fakes.stub_out_rate_limiting(self.stubs)

        self.stubs.Set(db, "key_pair_get_all_by_user",
                       db_key_pair_get_all_by_user)
        self.stubs.Set(db, "key_pair_create", db_key_pair_create)
        self.stubs.Set(db, "key_pair_destroy", db_key_pair_destroy)
Ejemplo n.º 2
0
    def setUp(self):
        super(KeypairsTest, self).setUp()
        self.Controller = keypairs.Controller()
        fakes.stub_out_networking(self.stubs)
        fakes.stub_out_rate_limiting(self.stubs)

        self.stubs.Set(db, "key_pair_get_all_by_user",
                       db_key_pair_get_all_by_user)
        self.stubs.Set(db, "key_pair_create", db_key_pair_create)
        self.stubs.Set(db, "key_pair_destroy", db_key_pair_destroy)
        self.flags(osapi_compute_extension=[
            'nova.api.openstack.compute.contrib.select_extensions'
        ],
                   osapi_compute_ext_list=['Keypairs'])
        self.app = fakes.wsgi_app(init_only=('os-keypairs', ))