示例#1
0
 def test_missing_error_code(self):
     data = self.sample_data("missing_error_code.xml")
     parser = HoldReleaseResponseParser(None)
     assert_raises_regexp(
         RemoteInitiatedServerError, "No status code!",
         parser.process_all, data
     )
示例#2
0
 def test_internal_server_error(self):
     data = self.sample_data("invalid_error_code.xml")
     parser = HoldReleaseResponseParser(None)
     assert_raises_regexp(
         RemoteInitiatedServerError, "Invalid response code from Axis 360: abcd",
         parser.process_all, data
     )
示例#3
0
 def test_internal_server_error(self):
     data = self.sample_data("internal_server_error.xml")
     parser = HoldReleaseResponseParser(None)
     assert_raises_regexp(
         RemoteInitiatedServerError, "Internal Server Error",
         parser.process_all, data
     )
示例#4
0
 def test_failure(self):
     data = self.sample_data("release_hold_failure.xml")
     parser = HoldReleaseResponseParser(None)
     assert_raises(NotOnHold, parser.process_all, data)
示例#5
0
 def test_success(self):
     data = self.sample_data("release_hold_success.xml")
     parser = HoldReleaseResponseParser(None)
     eq_(True, parser.process_all(data))
示例#6
0
 def test_success(self):
     data = self.sample_data("release_hold_success.xml")
     parser = HoldReleaseResponseParser()
     eq_(True, parser.process_all(data))