Beispiel #1
0
 def test_iter_match_fail(self):
     s = Service(Context(http = MockHttp(HTTP_SRC_DIR), service = "http://example.org/service.atomsvc"))
     try:
         s.iter_match('image/png').next()
         self.fail("StopIteration should have been raised.")
     except StopIteration:
         pass
Beispiel #2
0
 def test_iter_match(self):
     s = Service(Context(http = MockHttp(HTTP_SRC_DIR), service = "http://example.org/service_entry_image.atomsvc"))
     self.assertEqual("http://example.org/images/index.atom", s.iter_match('image/png').next().collection)