Esempio n. 1
0
    def test_parse_hold_success(self):
        data = self.sample_data("place_hold_success.xml")
        parser = HoldResponseParser(self._default_collection)
        parsed = parser.process_all(data)
        assert isinstance(parsed, HoldInfo)
        eq_(1, parsed.hold_position)

        # The HoldInfo is given the Collection object we passed into
        # the HoldResponseParser.
        eq_(self._default_collection.id, parsed.collection_id)
Esempio n. 2
0
 def test_parse_already_on_hold(self):
     data = self.sample_data("already_on_hold.xml")
     parser = HoldResponseParser(None)
     assert_raises(AlreadyOnHold, parser.process_all, data)
Esempio n. 3
0
 def test_parse_hold_success(self):
     data = self.sample_data("place_hold_success.xml")
     parser = HoldResponseParser()
     parsed = parser.process_all(data)
     assert isinstance(parsed, HoldInfo)
     eq_(1, parsed.hold_position)
Esempio n. 4
0
 def test_parse_hold_success(self):
     data = self.sample_data("place_hold_success.xml")
     parser = HoldResponseParser()
     parsed = parser.process_all(data)
     assert isinstance(parsed, HoldInfo)
     eq_(1, parsed.hold_position)