2908.4.16
by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review. |
1 |
# Copyright 2006 Canonical Ltd. All rights reserved.
|
2 |
||
3 |
# Twisted Application Configuration file.
|
|
4 |
# Use with "twistd2.4 -y <file.tac>", e.g. "twistd -noy server.tac"
|
|
5 |
||
6 |
import os |
|
7 |
||
8 |
from twisted.application import service, internet, strports |
|
9 |
from twisted.web import server |
|
10 |
||
11 |
from canonical.launchpad.daemons import tachandler |
|
8322.4.1
by Curtis Hovey
Moved the distributionmirror objects to lp.registry. |
12 |
from lp.registry.tests.distributionmirror_http_server import ( |
2908.4.16
by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review. |
13 |
DistributionMirrorTestHTTPServer) |
14 |
||
15 |
||
16 |
application = service.Application('DistributionMirrorTestHTTPServer') |
|
17 |
httpserverService = service.IServiceCollection(application) |
|
18 |
||
19 |
# Service that announces when the daemon is ready
|
|
20 |
tachandler.ReadyService().setServiceParent(httpserverService) |
|
21 |
||
22 |
root = DistributionMirrorTestHTTPServer() |
|
23 |
site = server.Site(root) |
|
24 |
site.displayTracebacks = False |
|
6916.1.4
by Curtis Hovey
Fixed malformed comments found after the end of file loop was fixed in xxxreport.py. |
25 |
# XXX: Guilherme Salgado 2007-01-30: The port 11375 is what we use in the
|
26 |
# URLs of our mirrors in sampledata, so we need to use the same here.
|
|
2908.4.16
by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review. |
27 |
strports.service("11375", site).setServiceParent(httpserverService) |