Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: third_party/twisted_8_1/twisted/web/test/test_tap.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2008 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 """
5 Tests for L{twisted.web.tap}.
6 """
7
8 from twisted.trial.unittest import TestCase
9
10 from twisted.web.server import Site
11 from twisted.web.static import Data
12 from twisted.web.distrib import ResourcePublisher
13 from twisted.web.tap import makePersonalServerFactory
14
15 from twisted.spread.pb import PBServerFactory
16
17
18 class ServiceTests(TestCase):
19 """
20 Tests for the service creation APIs in L{twisted.web.tap}.
21 """
22 def test_makePersonalServerFactory(self):
23 """
24 L{makePersonalServerFactory} returns a PB server factory which has
25 as its root object a L{ResourcePublisher}.
26 """
27 # The fact that this pile of objects can actually be used somehow is
28 # verified by twisted.web.test.test_distrib.
29 site = Site(Data("foo bar", "text/plain"))
30 serverFactory = makePersonalServerFactory(site)
31 self.assertIsInstance(serverFactory, PBServerFactory)
32 self.assertIsInstance(serverFactory.root, ResourcePublisher)
33 self.assertIdentical(serverFactory.root.site, site)
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/web/test/test_static.py ('k') | third_party/twisted_8_1/twisted/web/test/test_web.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698