def setup_class(self): model.Session.remove() CreateTestData.create() d = Dumper() ts = int(time()) self.outpath = '/tmp/mytestdump-%s.js' % ts if os.path.exists(self.outpath): os.remove(self.outpath) d.dump_json(self.outpath)
def _test_load(self): model.repo.rebuild_db() model.repo.create_db() d = Dumper() d.load_json(self.outpath) assert len(model.Package.query.all()) == 2