Пример #1
0
    def test_custom_query(self):
        share = db_utils.create_share()
        share_access = db_utils.create_access(share_id=share['id'])

        db_api.share_access_delete(self.ctxt, share_access.id)
        self.assertRaises(exception.NotFound, db_api.share_access_get,
                          self.ctxt, share_access.id)
Пример #2
0
    def test_custom_query(self):
        share = api.share_create(self.ctxt, {'host': 'foobar'})
        test_access_values = {
            'share_id': share['id'],
            'access_type': 'ip',
            'access_to': 'fake',
        }
        share_access = api.share_access_create(self.ctxt, test_access_values)

        api.share_access_delete(self.ctxt, share_access.id)
        self.assertRaises(exception.NotFound, api.share_access_get,
                          self.ctxt, share_access.id)