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()
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
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
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
def name_collision(): build = Build() phase_1 = build.add(0, add_justices) phase_2 = build.add(1, add_justices) return