In the traditional scheduling of integrated electricity and district heating systems (IEDHS) with high penetrations of wind power, large amounts of wind power curtailments can still occur. Exploring the underlying flexibilities within the existing infrastructure can be beneficial to the further integration of wind power. The thermal inertia of district heating network and aggregated buildings can provide such flexibility. This paper proposes a collaborative scheduling model of integrated electricity and district heating systems considering the thermal inertia of district heating network and aggregated buildings and a flexibility assessment method of the integrated electricity and district heating systems. With the detailed thermal model of the aggregated buildings and the transmission time delay characteristics of heating network pipelines, a thermal inertia model of the district heating systems is proposed. Then, the scheduling model considering thermal inertia of district heating network and the aggregated buildings is formulated as a quadratic programming problem, the objective function of which is to minimize the operating cost of integrated electricity and district heating systems. Four scheduling cases based on whether to consider the transmission time delay characteristics of heating network pipelines or the adjustable indoor temperature of aggregated buildings are established, and a flexibility assessment method of different cases for the electricity system and coupling component is proposed. The validity of the model is verified by cases studies. Numerical results show that the proposed optimization scheduling model can make use of the heat storage capacity of district heating network and aggregated buildings, reduce operating costs, increase the flexibility of electricity system and effectively promote wind power integration.