Example #1
0
 def test_old_chex_import(self):
     """Success when importing old style chex files."""
     self.assertEqual(len(_items_by_uuid), 0)
     reload(self._load('chex_chandler1.gz'), gzip=True)
     self.assertEqual(len(_items_by_uuid), 49)
     self._after_import_tests()
     entry = self._find_sidebar_entry(get_item_for_uuid(self.work_collection_uuid))
     self.assertEqual(entry.hsv_color[0], 210.0)
Example #2
0
def load_domain():
    """Load up the domain model for ChandlerApplication"""
    if not isfile(EIM_PERSISTENCE_FILE):
        ChandlerApplication.sidebar_entries = trellis.Set(
                sidebar.SidebarEntry(collection=keyword.Keyword(name))
                for name in (u"Home", u"Work")
            )
    else:
        from chandler.sharing import dumpreload
        dumpreload.reload(EIM_PERSISTENCE_FILE, gzip=True)
Example #3
0
def load_domain():
    """Load up the domain model for ChandlerApplication"""
    if not isfile(EIM_PERSISTENCE_FILE):
        ChandlerApplication.sidebar_entries = trellis.Set(
            sidebar.SidebarEntry(collection=keyword.Keyword(name)) for name in (u"Home", u"Work")
        )
    else:
        from chandler.sharing import dumpreload

        dumpreload.reload(EIM_PERSISTENCE_FILE, gzip=True)
Example #4
0
 def test_new_chex_import(self):
     """Success when importing new style chex files."""
     self.assertEqual(len(_items_by_uuid), 0)
     reload(self._load('chex_chandler2.gz'), gzip=True)
     self.assertEqual(len(_items_by_uuid), 49)
     self._after_import_tests()