def test_video_clip(self):
        """Test video clip loading from XML."""
        from dojson.contrib.marc21.utils import create_record
        from cds_dojson.marc21.models.video import (
            model as marc21
        )

        blob = create_record(CDS_VIDEO_CLIP)
        data = marc21.do(blob)

        # Check if credits are correct
        assert len(data.get('creation_production_credits_note')) == 3
        # Check if the host entry is correct
        assert data[
            'host_item_entry'][0]['report_number'] == ["CERN-MOVIE-2015-038"]

        # Check physical description
        expected_physical_description = [
            {
                "accompanying_material": "16:9",
                "other_physical_details": "1920x1080 16/9, 25.00",
                "dimensions": ["25"],
                "extent": ["00:09:05.280"]
            }
        ]
        assert data.get(
            'physical_description') == expected_physical_description

        # Check that no fields are missing their model
        assert marc21.missing(blob) == []
    def test_video_project(self):
        """Test video project from XML."""
        from dojson.contrib.marc21.utils import create_record
        from cds_dojson.marc21.models.default import (
            model as marc21
        )

        blob = create_record(CDS_VIDEO_PROJECT)
        data = marc21.do(blob)

        # Check if the video file is present
        assert data['constituent_unit_entry'][0][
            'report_number'] == ['CERN-MOVIE-2015-038-001']

        # Check the control number
        assert data.get('control_number') == '2053119'

        # Check that no fields are missing their model
        assert marc21.missing(blob) == []