Example #1
0
 def test_destroy(self):
     self.mox.StubOutWithMock(db, 'key_pair_destroy')
     db.key_pair_destroy(self.context, 'fake-user', 'foo-keypair')
     self.mox.ReplayAll()
     keypair_obj = keypair.KeyPair(context=self.context)
     keypair_obj.id = 123
     keypair_obj.user_id = 'fake-user'
     keypair_obj.name = 'foo-keypair'
     keypair_obj.destroy()
Example #2
0
 def test_destroy_by_name(self):
     self.mox.StubOutWithMock(db, 'key_pair_destroy')
     db.key_pair_destroy(self.context, 'fake-user', 'foo-keypair')
     self.mox.ReplayAll()
     keypair.KeyPair.destroy_by_name(self.context, 'fake-user',
                                     'foo-keypair')
Example #3
0
 def destroy(self):
     db.key_pair_destroy(self._context, self.user_id, self.name)
Example #4
0
 def destroy_by_name(cls, context, user_id, name):
     db.key_pair_destroy(context, user_id, name)
Example #5
0
 def destroy(self):
     db.key_pair_destroy(self._context, self.user_id, self.name)
Example #6
0
 def destroy_by_name(cls, context, user_id, name):
     db.key_pair_destroy(context, user_id, name)