Skip to content

Commit

Permalink
Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed May 8, 2024
1 parent 9ce795c commit 4e16fb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,15 +768,14 @@ def test_oai(self):

root = etree.fromstring(res.data)

namespaces = {'ns0': 'http://www.openarchives.org/OAI/2.0/',
'dc': 'http://purl.org/dc/elements/1.1/',
namespaces = {'dc': 'http://purl.org/dc/elements/1.1/',
'oaipmh': 'http://www.openarchives.org/OAI/2.0/',
'datacite': 'http://datacite.org/schema/kernel-4'}

self.assertEqual(root.find(".//dc:title", namespaces).text, "Deploy a VM")
self.assertEqual(root.find(".//dc:creator", namespaces).text, "Miguel Caballer")
self.assertEqual(root.find(".//dc:date", namespaces).text, "2020-09-08")
self.assertEqual(root.find(".//ns0:identifier", namespaces).text,
self.assertEqual(root.find(".//oaipmh:identifier", namespaces).text,
"https://github.com/grycap/tosca/blob/main/templates/simple-node-disk.yml")
# self.assertIsNotNone(root.find(".//dc:type", namespace_dc))
# self.assertIsNotNone(root.find(".//dc:rights", namespace_dc))
Expand All @@ -799,7 +798,7 @@ def test_oai(self):
self.assertEqual(root.find(".//dc:title", namespaces).text, "Deploy a VM")
self.assertEqual(root.find(".//dc:creator", namespaces).text, "Miguel Caballer")
self.assertEqual(root.find(".//dc:date", namespaces).text, "2020-09-08")
self.assertEqual(root.find(".//ns0:identifier", namespaces).text,
self.assertEqual(root.find(".//oaipmh:identifier", namespaces).text,
"https://github.com/grycap/tosca/blob/main/templates/simple-node-disk.yml")
# self.assertIsNotNone(root.find(".//dc:type", namespace_dc))
# self.assertIsNotNone(root.find(".//dc:rights", namespace_dc))
Expand Down

0 comments on commit 4e16fb3

Please sign in to comment.