return self.__class__._offset
            def dst(self, dt):
                return self.__class__._dst
            def tzname(self, dt):
                return self.__class__._name
        start = datetime.datetime(2018, 3, 25, 10, tzinfo=UTC0530())
        dag = DAG("tz_dag", start_date=start, schedule="@hourly")
        when = dag.following_schedule(start)
        assert when.isoformat() == "2018-03-25T05:30:00+00:00"
    def test_dagtag_repr(self):
        clear_db_dags()
        dag = DAG("dag-test-dagtag", start_date=DEFAULT_DATE, tags=["tag-1", "tag-2"])
        dag.sync_to_db()
        with create_session() as session:
            assert {"tag-1", "tag-2"} == {
                repr(t) for t in session.query(DagTag).filter(DagTag.dag_id == "dag-test-dagtag").all()
            }
    def test_bulk_write_to_db(self):
        clear_db_dags()
        dags = [DAG(f"dag-bulk-sync-{i}", start_date=DEFAULT_DATE, tags=["test-dag"]) for i in range(0, 4)]
        with assert_queries_count(5):
            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-1", "test-dag"),