Mercurial > wikked
view tests/test_db.py @ 303:6bd9d44fc535
Wiki updater cleanup and improvements.
* Less confusing API on `WikiParameters`.
* Less confusing way to do things when running the Flask app.
* When running locally, and the user edits a page, just resolve that page and
mark any other including/querying page invalidated. Resolve those lazily on
demand.
* Add DB ability to return the resolved state of pages.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 01 Oct 2014 08:19:03 -0700 |
parents | ebb12ff21cb2 |
children |
line wrap: on
line source
from tests import WikkedTest class DatabaseTest(WikkedTest): def testEmpty(self): wiki = self._getWikiFromStructure({}) self.assertEqual([], list(wiki.getPageUrls())) def testOnePage(self): wiki = self._getWikiFromStructure({ '/foo.txt': 'A test page.' }) self.assertEqual(['/foo'], list(wiki.getPageUrls())) page = wiki.getPage('/foo') self.assertEqual('/foo', page.url) self.assertEqual('/foo.txt', page.path) self.assertEqual('A test page.', page.raw_text)