Ejemplo n.º 1
0
 def build(cls):
   cls.db.reset()
   build = Build()
   phase_1 = build.add(0, add_justices)
   phase_2 = build.add(1, lambda x: add_scdb_votes(x, scdb_f=SCDB_TEST_FILE), name='add_scdb_votes')
   cls.db.populate(build)
   return cls.db.Session()
Ejemplo n.º 2
0
 def setup_class(cls):
   cls.database.reset()
   build = Build()
   phase_1 = build.add(0, add_justices)
   phase_2 = build.add(1, lambda x: add_scdb_votes(x, scdb_f=SCDB_TEST_FILE), name='add_scdb_votes')
   cls.database.populate(build)
   cls.session = cls.database.Session()
   return
Ejemplo n.º 3
0
def build_db(db_file, data_file):

  build = Build()
  phase_1 = build.add(0, add_justices)
  phase_2 = build.add(1, lambda x: add_scdb_votes(x, scdb_f=data_file), name='add_scdb_votes')

  db = DB(db_file)
  db.reset()

  db.populate(build)
  
  session = db.Session()
  return
Ejemplo n.º 4
0
def test_no_duplication():
  db = DB(TEST_DB)
  db.reset()
  build = Build()
  phase_1 = build.add(0, add_justices)
  db.populate(build)
  db.populate(build)
  db.reset()
  return
Ejemplo n.º 5
0
def name_collision():
  build = Build()
  phase_1 = build.add(0, add_justices)
  phase_2 = build.add(1, add_justices)
  return