def test_format_submission_status_removed(self): """Test_format_submission_status_removed""" status_xml = open("%s%sTest_submission_status_unknown.xml" % (CFG_TMPDIR, os.sep)).read() response = format_submission_status(status_xml) self.assertEqual(response['status'], CFG_SUBMISSION_STATUS_REMOVED) self.assertEqual(response['id_submission'], "") self.assertEqual(response['error'], "identifier does not correspond to a SWORD wrapper, it may belong to a media deposit")
def test_format_submission_status_onhold(self): """Test_format_submission_status_onhold""" status_xml = open("%s%sTest_submission_status_onhold.xml" % (CFG_TMPDIR, os.sep)).read() response = format_submission_status(status_xml) self.assertEqual(response["status"], "onhold") self.assertEqual(response["id_submission"], "") self.assertEqual(response["error"], "")
def test_format_submission_status_published(self): """Test_format_submission_status_published""" status_xml = open("%s%sTest_submission_status_published.xml" % (CFG_TMPDIR, os.sep)).read() response = format_submission_status(status_xml) self.assertEqual(response['status'], "published") self.assertEqual(response['id_submission'], "1003.9876") self.assertEqual(response['error'], "")
def test_format_submission_status_onhold(self): """Test_format_submission_status_onhold""" status_xml = open("%s%sTest_submission_status_onhold.xml" % (CFG_TMPDIR, os.sep)).read() response = format_submission_status(status_xml) self.assertEqual(response['status'], "onhold") self.assertEqual(response['id_submission'], "") self.assertEqual(response['error'], "")
def test_format_submission_status_removed(self): """Test_format_submission_status_removed""" status_xml = open("%s%sTest_submission_status_unknown.xml" % (CFG_TMPDIR, os.sep)).read() response = format_submission_status(status_xml) self.assertEqual(response['status'], CFG_SUBMISSION_STATUS_REMOVED) self.assertEqual(response['id_submission'], "") self.assertEqual( response['error'], "identifier does not correspond to a SWORD wrapper, it may belong to a media deposit" )