diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..24303e3 --- /dev/null +++ b/conftest.py @@ -0,0 +1,14 @@ +""" +pytest configuration for itsulu-blog-publisher tests. +Ensures the addon is installed into the test database before tests run. +""" +import pytest + + +@pytest.fixture(scope='session', autouse=True) +def install_addon(env): + """Install itsulu_blog_publisher and dependencies before tests run.""" + env['ir.module.module'].search([ + ('name', 'in', ['base', 'website', 'website_blog', 'mail', 'itsulu_blog_publisher']) + ]).button_install() + env.cr.commit()