Exemple #1
0
 def test_load(self):
     from pypitches import select_gamedirs
     from pypitches import load
     select_gamedirs.classify_local_dirs_by_filesystem(static_dir)
     load.load()
     self.assertEqual(self.session.query(Game).count(), 3)
     self.session.commit()
Exemple #2
0
 def test_load(self):
     from pypitches import select_gamedirs
     from pypitches import load
     select_gamedirs.classify_local_dirs_by_filesystem(static_dir)
     load.load()
     self.assertEqual(self.session.query(Game).count(), 3)
     self.session.commit()
    def setUp(self):
        initdb(postgres_test_db, postgres_user, postgres_password)
        self.session = model.SessionManager.create(postgres_test_db, postgres_user, postgres_password) 

        from pypitches import select_gamedirs
        from pypitches import load
        select_gamedirs.classify_local_dirs_by_filesystem(static_dir)
        try:
            load.load()
        except IntegrityError:
            import pdb
            pdb.set_trace()
        self.assertEqual(self.session.query(Game).count(), 3)