Ejemplo n.º 1
0
 def test_metadata_url_format(self):
     # Arbitrary metadata should be passed through url_format()
     page = Page(**self.page_kwargs)
     self.assertIn('summary', page.url_format.keys())
     page.metadata['directory'] = 'test-dir'
     page.settings = get_settings(PAGE_SAVE_AS='{directory}/{slug}')
     self.assertEqual(page.save_as, 'test-dir/foo-bar')
Ejemplo n.º 2
0
 def test_metadata_url_format(self):
     # Arbitrary metadata should be passed through url_format()
     page = Page(**self.page_kwargs)
     self.assertIn("summary", page.url_format.keys())
     page.metadata["directory"] = "test-dir"
     page.settings = get_settings(PAGE_SAVE_AS="{directory}/{slug}")
     self.assertEqual(page.save_as, "test-dir/foo-bar")
Ejemplo n.º 3
0
 def test_metadata_url_format(self):
     """Arbitrary metadata should be passed through url_format()
     """
     page = Page(**self.page_kwargs)
     self.assertIn('summary', page.url_format.keys())
     page.metadata['directory'] = 'test-dir'
     page.settings = _DEFAULT_CONFIG.copy()
     page.settings['PAGE_SAVE_AS'] = '{directory}/{slug}'
     self.assertEqual(page.save_as, 'test-dir/foo-bar')
Ejemplo n.º 4
0
 def test_metadata_url_format(self):
     """Arbitrary metadata should be passed through url_format()
     """
     page = Page(**self.page_kwargs)
     self.assertIn('summary', page.url_format.keys())
     page.metadata['directory'] = 'test-dir'
     page.settings = _DEFAULT_CONFIG.copy()
     page.settings['PAGE_SAVE_AS'] = '{directory}/{slug}'
     self.assertEqual(page.save_as, 'test-dir/foo-bar')
Ejemplo n.º 5
0
 def test_metadata_url_format(self):
     """Arbitrary metadata should be passed through url_format()
     """
     page = Page(**self.page_kwargs)
     self.assertIn("summary", page.url_format.keys())
     page.metadata["directory"] = "test-dir"
     page.settings = _DEFAULT_CONFIG.copy()
     page.settings["PAGE_SAVE_AS"] = "{directory}/{slug}"
     self.assertEqual(page.save_as, "test-dir/foo-bar")