コード例 #1
0
 def test_blueprints_host_has_api(self):
     # Requests to /api on the blueprints domain are treated as web service
     # requests.
     request, publication = get_request_and_publication(
         host=config.vhost.blueprints.hostname,
         extra_environment={'PATH_INFO': '/api/1.0'})
     # XXX MichaelHudson, 2010-07-20, bug=607664: WebServiceLayer only
     # actually provides WebServiceLayer in the sense of verifyObject after
     # traversal has started.
     self.assertTrue(WebServiceLayer.providedBy(request))
コード例 #2
0
 def test_bugs_host_has_api(self):
     # Requests to /api on the bugs domain are treated as web service
     # requests.
     request, publication = get_request_and_publication(
         host=config.vhost.bugs.hostname,
         extra_environment={'PATH_INFO': '/api/1.0'})
     # XXX MichaelHudson, 2010-07-20, bug=607664: WebServiceLayer only
     # actually provides WebServiceLayer in the sense of verifyObject after
     # traversal has started.
     self.assertTrue(WebServiceLayer.providedBy(request))
コード例 #3
0
 def test_blueprints_request_provides_blueprints_layer(self):
     # The request constructed for requests to the blueprints hostname
     # provides BlueprintsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.blueprints.hostname)
     self.assertProvides(request, BlueprintsLayer)
コード例 #4
0
 def test_translations_request_provides_translations_layer(self):
     # The request constructed for requests to the translations hostname
     # provides TranslationsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.translations.hostname)
     self.assertProvides(request, TranslationsLayer)
コード例 #5
0
 def test_code_request_provides_code_layer(self):
     # The request constructed for requests to the code hostname provides
     # CodeLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.code.hostname)
     self.assertProvides(request, CodeLayer)
コード例 #6
0
 def test_code_request_provides_code_layer(self):
     # The request constructed for requests to the code hostname provides
     # CodeLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.code.hostname)
     self.assertProvides(request, CodeLayer)
コード例 #7
0
 def test_bugs_request_provides_bugs_layer(self):
     # The request constructed for requests to the bugs hostname provides
     # BugsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.bugs.hostname)
     self.assertProvides(request, BugsLayer)
コード例 #8
0
 def test_bugs_request_provides_bugs_layer(self):
     # The request constructed for requests to the bugs hostname provides
     # BugsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.bugs.hostname)
     self.assertProvides(request, BugsLayer)
コード例 #9
0
 def test_blueprints_request_provides_blueprints_layer(self):
     # The request constructed for requests to the blueprints hostname
     # provides BlueprintsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.blueprints.hostname)
     self.assertProvides(request, BlueprintsLayer)
コード例 #10
0
 def test_translations_request_provides_translations_layer(self):
     # The request constructed for requests to the translations hostname
     # provides TranslationsLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.translations.hostname)
     self.assertProvides(request, TranslationsLayer)
コード例 #11
0
 def test_answers_request_provides_answers_layer(self):
     # The request constructed for requests to the answers hostname
     # provides AnswersLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.answers.hostname)
     self.assertProvides(request, AnswersLayer)
コード例 #12
0
 def test_answers_request_provides_answers_layer(self):
     # The request constructed for requests to the answers hostname
     # provides AnswersLayer.
     request, publication = get_request_and_publication(
         host=config.vhost.answers.hostname)
     self.assertProvides(request, AnswersLayer)