"""
Some test instrumentation data used by the regression tests in the RD.
"""

import re


BASE_RECORD = """
<oai:record xmlns:oai="http://www.openarchives.org/OAI/2.0/">
	<oai:header>
		<oai:identifier>ivo://org.gavo.dc/std/glots</oai:identifier>
		<oai:datestamp>2016-01-21T15:52:38Z</oai:datestamp>
	</oai:header>
	<oai:metadata>
<ri:Resource status="active" xsi:type="vstd:Standard" updated="2015-07-21T07:07:39" created="2015-07-14T07:49:00Z" xmlns:ri="http://www.ivoa.net/xml/RegistryInterface/v1.0">
          <title>VOIDOI broken test resource</title>
          <identifier>ivo://org.gavo.dc/test/test</identifier>
          <curation>
            <publisher>The GAVO DC team</publisher>
            <creator>
              <name>Markus Demleitner</name>
            </creator>
            <date role="updated">2015-07-21T07:07:39</date>
            <contact>
              <name>GAVO Data Center Team</name>
              <email>msdemlei@ari.uni-heidelberg.de</email>
            </contact>
          </curation>
          <content>
            <subject>testing</subject>
            <description>Just an empty test</description>
            <referenceURL>http://soft.g-vo.org/DaCHS</referenceURL>
          </content>
          <endorsedVersion status="note" use="preferred">1.0</endorsedVersion>
        </ri:Resource>
</oai:metadata></oai:record>
"""


RECORDS = {
	"ivo://org.gavo.dc/test/invalid":
		re.sub('/test/test"', '/test/invalid"',
			re.sub("<subject>.*</subject>", "", BASE_RECORD)),
}
