mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 17:08:46 -06:00
[FIX] CI
[ADD] tests for attachments_to_filesystem
This commit is contained in:
parent
f33b68a844
commit
621d5284cd
@ -37,6 +37,7 @@ def populate_tags(cr, column):
|
|||||||
env = Environment(cr, SUPERUSER_ID, {})
|
env = Environment(cr, SUPERUSER_ID, {})
|
||||||
document_page_tag = env['document.page.tag']
|
document_page_tag = env['document.page.tag']
|
||||||
document_page = env['document.page']
|
document_page = env['document.page']
|
||||||
|
# pylint: disable=E8103
|
||||||
cr.execute(
|
cr.execute(
|
||||||
'SELECT %s, ARRAY_AGG(id) from %s WHERE %s IS NOT NULL GROUP BY %s' % (
|
'SELECT %s, ARRAY_AGG(id) from %s WHERE %s IS NOT NULL GROUP BY %s' % (
|
||||||
column, env['document.page']._table, column, column))
|
column, env['document.page']._table, column, column))
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||||
access_document_page_tag,access_document_page_tag,model_document_page_tag,,1,0,0,0
|
access_document_page_tag_all,access_document_page_tag,model_document_page_tag,,1,0,0,0
|
||||||
access_document_page_tag,access_document_page_tag,model_document_page_tag,base.group_user,1,1,1,1
|
access_document_page_tag,access_document_page_tag,model_document_page_tag,base.group_user,1,1,1,1
|
||||||
|
|
@ -20,6 +20,7 @@
|
|||||||
from psycopg2 import IntegrityError
|
from psycopg2 import IntegrityError
|
||||||
from openerp.tests.common import TransactionCase
|
from openerp.tests.common import TransactionCase
|
||||||
from ..hooks import post_init_hook
|
from ..hooks import post_init_hook
|
||||||
|
from openerp.tools.misc import mute_logger
|
||||||
|
|
||||||
|
|
||||||
class TestDocumentPageTags(TransactionCase):
|
class TestDocumentPageTags(TransactionCase):
|
||||||
@ -28,5 +29,6 @@ class TestDocumentPageTags(TransactionCase):
|
|||||||
post_init_hook(self.cr, self.registry)
|
post_init_hook(self.cr, self.registry)
|
||||||
# check we can't create nonunique tags
|
# check we can't create nonunique tags
|
||||||
with self.assertRaises(IntegrityError):
|
with self.assertRaises(IntegrityError):
|
||||||
self.env['document.page.tag'].name_create('test')
|
with mute_logger('openerp.sql_db'):
|
||||||
self.env['document.page.tag'].name_create('test')
|
self.env['document.page.tag'].name_create('test')
|
||||||
|
self.env['document.page.tag'].name_create('test')
|
||||||
|
Loading…
Reference in New Issue
Block a user