def test_next_batch_id(): with tempdir(): os.mkdir(Constants.DEFAULT_LDIR) db = CsvDatabase() batch_id = db.next_batch_id() assert batch_id == 1 batch_id = db.next_batch_id() assert batch_id == 2
def test_persist(): with tempdir(): os.mkdir(Constants.DEFAULT_LDIR) db = CsvDatabase() db.persist() assert(os.path.exists(db.filename))