"""Tests v43 DDEX header generation.""" from textwrap import dedent from soundrecording_utils.constants.ddex.constants import RuleService from soundrecording_utils.ddex.v43 import header def test_header_creates_correctly(execution_meta, helpers): """Test that header is created as expected.""" result = helpers.print_xml(header.generate_header( execution_meta, RuleService.YOUTUBE )) expected = """ message_thread_id message_id PADPIDA2012041004F The Orchard Enterprises The Orchard Enterprises, LLC PADPIDA2015120100H YouTube_ContentID 2020-01-02T03:04:05Z LiveMessage """ assert result == dedent(expected).strip()