diff --git a/addons/itsulu_blog_publisher/tests/test_bdd_steps.py b/addons/itsulu_blog_publisher/tests/test_bdd_steps.py index c7fd5c4..c7a7a7a 100644 --- a/addons/itsulu_blog_publisher/tests/test_bdd_steps.py +++ b/addons/itsulu_blog_publisher/tests/test_bdd_steps.py @@ -24,9 +24,9 @@ scenarios('../features/notification_email.feature') # ================================================================= # @pytest.fixture -def odoo_env(env): +def odoo_env(request): """pytest-odoo's env fixture, re-exported for BDD step access.""" - return env + return request.getfixturevalue('env') @pytest.fixture diff --git a/addons/itsulu_blog_publisher/tests/test_blog_post_social.py b/addons/itsulu_blog_publisher/tests/test_blog_post_social.py index 3ab435c..24f0ffd 100644 --- a/addons/itsulu_blog_publisher/tests/test_blog_post_social.py +++ b/addons/itsulu_blog_publisher/tests/test_blog_post_social.py @@ -254,7 +254,7 @@ class TestNotificationEmail(TransactionCase): # ACT — render the template synchronously to check the subject template = self.env.ref('itsulu_blog_publisher.email_template_blog_published') - rendered = template.generate_email([log.id], fields=['subject']) + rendered = template._generate_template([log.id], fields=['subject']) # ASSERT subject = rendered[log.id].get('subject', '') @@ -300,7 +300,7 @@ class TestNotificationEmail(TransactionCase): # Verify template renders all platform copy in the body template = self.env.ref('itsulu_blog_publisher.email_template_blog_published') - rendered = template.generate_email([log.id], fields=['body_html']) + rendered = template._generate_template([log.id], fields=['body_html']) body = rendered[log.id].get('body_html', '') self.assertIn('Twitter A copy', body, "Body must contain Twitter copy") self.assertIn('LinkedIn copy', body, "Body must contain LinkedIn copy") @@ -319,7 +319,7 @@ class TestNotificationEmail(TransactionCase): # ASSERT — render the template synchronously to check the URL appears in the body template = self.env.ref('itsulu_blog_publisher.email_template_blog_published') - rendered = template.generate_email([log.id], fields=['body_html']) + rendered = template._generate_template([log.id], fields=['body_html']) body = rendered[log.id].get('body_html', '') self.assertIn('itsulu.com', body, "Body must contain itsulu.com URL")