def change(upd): """Modifies current settings with the contents of the upd dictionary.""" current = dict(get_all()) current.update(upd) header = util.pack_page_header(current) page = get_host_page() page.body = header + u'\n---\n' + current['text'] page.put()
def test_page_packing(self): """Tests whether page haders can be built correctly.""" header = util.pack_page_header({ 'simple': 'foo', 'list': ['foo', 'bar'], 'text': 'must be ignored', }) self.assertEquals('list: foo, bar\nsimple: foo', header)