Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add more assertions to rendering test

Krzysiek Szularz7daf7440b271
diff --git a/communication/tests.py b/communication/tests.py
index 5b5542b6a8..24ba0894b4 100644
--- a/communication/tests.py
+++ b/communication/tests.py
@@ -66,5 +66,8 @@ class RenderBlocksTestCase(TestCase):
get_template_mock.return_value = [html_block, some_block, non_block]
blocks = render_blocks(template_name=sentinel.template_name,
context=sentinel.context)
- self.assertEquals(blocks, {HTML: html_block.render()})
context_mock.assert_called_once_with(sentinel.context)
+ html_block.render.assert_called_once_with(context_mock())
+ some_block.render.assert_not_called()
+ non_block.render.assert_not_called()
+ self.assertEquals(blocks, {HTML: html_block.render()})