("dag-bulk-sync-2", "test-dag"),
                ("dag-bulk-sync-3", "test-dag"),
            } == set(session.query(DagTag.dag_id, DagTag.name).all())
            for row in session.query(DagModel.last_parsed_time).all():
                assert row[0] is not None
        
        with assert_queries_count(8):
            DAG.bulk_write_to_db(dags)
        with assert_queries_count(8):
            DAG.bulk_write_to_db(dags)
        
        for dag in dags:
            dag.tags.append("test-dag2")
        with assert_queries_count(9):
            DAG.bulk_write_to_db(dags)
        with create_session() as session:
            assert {"dag-bulk-sync-0", "dag-bulk-sync-1", "dag-bulk-sync-2", "dag-bulk-sync-3"} == {
                row[0] for row in session.query(DagModel.dag_id).all()
            }
            assert {
                ("dag-bulk-sync-0", "test-dag"),
                ("dag-bulk-sync-0", "test-dag2"),
                ("dag-bulk-sync-1", "test-dag"),
                ("dag-bulk-sync-1", "test-dag2"),
                ("dag-bulk-sync-2", "test-dag"),
                ("dag-bulk-sync-2", "test-dag2"),
                ("dag-bulk-sync-3", "test-dag"),
                ("dag-bulk-sync-3", "test-dag2"),
            } == set(session.query(DagTag.dag_id, DagTag.name).all())