Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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
Beispiel #4
0
 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