示例#1
0
    def test_format_submission_status_removed(self):
        """Test_format_submission_status_removed"""

        status_xml = open("%s%sTest_submission_status_unknown.xml" % (TEST_DATA, 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")
示例#2
0
    def test_format_submission_status_removed(self):
        """Test_format_submission_status_removed"""

        status_xml = open("%s%sTest_submission_status_unknown.xml" % (TEST_DATA, 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")
示例#3
0
    def test_format_submission_status_onhold(self):
        """Test_format_submission_status_onhold"""

        status_xml = open("%s%sTest_submission_status_onhold.xml" % (TEST_DATA, os.sep)).read()
        response = format_submission_status(status_xml)

        self.assertEqual(response['status'], "onhold")
        self.assertEqual(response['id_submission'], "")
        self.assertEqual(response['error'], "")
示例#4
0
    def test_format_submission_status_onhold(self):
        """Test_format_submission_status_onhold"""

        status_xml = open("%s%sTest_submission_status_onhold.xml" % (TEST_DATA, os.sep)).read()
        response = format_submission_status(status_xml)

        self.assertEqual(response['status'], "onhold")
        self.assertEqual(response['id_submission'], "")
        self.assertEqual(response['error'], "")