1010
1111
1212class TestCreateDocnameUniqueHash (ConfluenceTestCase ):
13+ def _build_postfix_hash_modifier (self ):
14+ conf = self .config
15+ conf .confluence_publish_postfix_hash_modifier = (
16+ str (conf .project )
17+ + str (conf .confluence_parent_page )
18+ + str (conf .confluence_publish_root )
19+ )
20+
1321 def test_no_parent_or_root_page_or_project_configured (self ):
1422 test_docname = 'docs/test_file.rst'
23+ self ._build_postfix_hash_modifier ()
1524 hv = ConfluenceState ._create_docname_unique_hash (
1625 docname = test_docname , config = self .config )
1726 self .assertEqual (hv , '75b0047d7552a5e4d91481e992f5ed339d868b3c' )
@@ -20,6 +29,7 @@ def test_parent_page_configured(self):
2029 test_docname = 'docs/test_file.rst'
2130 config = self .config
2231 config ['confluence_parent_page' ] = 'parent_page'
32+ self ._build_postfix_hash_modifier ()
2333 hv = ConfluenceState ._create_docname_unique_hash (
2434 docname = test_docname , config = self .config )
2535 self .assertEqual (hv , '9ca6dcc0b0e9eff175f1182ed75a2c43f359ed24' )
@@ -28,6 +38,7 @@ def test_publish_root_configured(self):
2838 test_docname = 'docs/test_file.rst'
2939 config = self .config
3040 config ['confluence_publish_root' ] = 'publish_root'
41+ self ._build_postfix_hash_modifier ()
3142 hv = ConfluenceState ._create_docname_unique_hash (
3243 docname = test_docname , config = self .config )
3344 self .assertEqual (hv , '02fe177ef99b746ed60cb1959d6134d3ea54fab9' )
@@ -36,6 +47,7 @@ def test_project_configured(self):
3647 test_docname = 'docs/test_file.rst'
3748 config = self .config
3849 config ['project' ] = 'grand_project'
50+ self ._build_postfix_hash_modifier ()
3951 hv = ConfluenceState ._create_docname_unique_hash (
4052 docname = test_docname , config = self .config )
4153 self .assertEqual (hv , '67e8ac11ab088e763c3cf2e577037b510a54ba41' )
0 commit comments