Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/common.py
# Copyright (C) 2017-2018 The Software Heritage developers | # Copyright (C) 2017-2019 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import base64 | import base64 | ||||
import hashlib | import hashlib | ||||
import os | import os | ||||
import shutil | import shutil | ||||
▲ Show 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | def setUp(self): | ||||
<url>https://hal-test.archives-ouvertes.fr/some-external-id</url> | <url>https://hal-test.archives-ouvertes.fr/some-external-id</url> | ||||
<author>some awesome author</author> | <author>some awesome author</author> | ||||
</entry>""" | </entry>""" | ||||
self.atom_entry_data1 = b"""<?xml version="1.0"?> | self.atom_entry_data1 = b"""<?xml version="1.0"?> | ||||
<entry xmlns="http://www.w3.org/2005/Atom"> | <entry xmlns="http://www.w3.org/2005/Atom"> | ||||
<author>another one</author> | <author>another one</author> | ||||
<author>no one</author> | <author>no one</author> | ||||
<codemeta:dateCreated>2017-10-07T15:17:08Z</codemeta:dateCreated> | |||||
</entry>""" | </entry>""" | ||||
self.atom_entry_data2 = b"""<?xml version="1.0"?> | self.atom_entry_data2 = b"""<?xml version="1.0"?> | ||||
<entry xmlns="http://www.w3.org/2005/Atom"> | <entry xmlns="http://www.w3.org/2005/Atom"> | ||||
<title>Awesome Compiler</title> | <title>Awesome Compiler</title> | ||||
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> | <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> | ||||
<external_identifier>1785io25c695</external_identifier> | <external_identifier>1785io25c695</external_identifier> | ||||
<updated>2017-10-07T15:17:08Z</updated> | <updated>2017-10-07T15:17:08Z</updated> | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |