"""Tests Meta DDEX header generation.""" from textwrap import dedent from soundrecording_utils.constants.ddex.constants import RuleService from soundrecording_utils.ddex.v38 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.TIKTOK) ) expected = """ message_thread_id message_id PADPIDA2012041004F The Orchard Enterprises The Orchard Enterprises, LLC PADPIDA2018082301A ByteDance Fingerprinting 2020-01-02T03:04:05Z """ assert result == dedent(expected).strip()