From 708aa918d6f8a32a96a37feeaef4d58a8cf1372b Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Thu, 16 May 2019 11:28:53 +1200 Subject: [PATCH] Fix as_urlpatterns test broken in merge with master --- bedrock/mozorg/tests/test_hierarchy.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bedrock/mozorg/tests/test_hierarchy.py b/bedrock/mozorg/tests/test_hierarchy.py index 653ee8a92e0..1001298ce8e 100644 --- a/bedrock/mozorg/tests/test_hierarchy.py +++ b/bedrock/mozorg/tests/test_hierarchy.py @@ -202,9 +202,8 @@ def test_url_none(self): class TestPageRoot(TestCase): - @patch('bedrock.mozorg.hierarchy.patterns') @patch.object(PageNode, 'page') - def test_as_urlpatterns(self, page, patterns): + def test_as_urlpatterns(self, page): """ as_urlpatterns should return a urlconf with the pages for all the nodes included in the tree. @@ -215,15 +214,7 @@ def test_as_urlpatterns(self, page, patterns): root = PageRoot('root', path='badsbi', template='fake3.html', children=[parent]) - patterns.return_value = 'asdf' # Mocking properties page.__get__ = lambda mock, self, cls: self.display_name - assert root.as_urlpatterns() == 'asdf' - - args = patterns.call_args[0] - assert args[0] == '' - assert 'child1' in args - assert 'child2' in args - assert 'root' in args - assert 'parent' not in args + assert root.as_urlpatterns() == ['root', 'child1', 'child2']