Example #1
0
 def setUp(self):
     db_model = db.DatabaseModel(reactor,
                                 dict(self.test_records),
                                 writable=True)
     dbResource = db.DatabaseResource(db_model)
     self.port = reactor.listenTCP(0,
                                   SiteWithDefaultHeaders(dbResource),
                                   interface="127.0.0.1")  # pylint: disable=no-member
Example #2
0
 def setUp(self):
     db_model = db.DatabaseModel(reactor, {}, writable=True)
     dbs_resource = db.DatabasesResource({'foo&bar': db_model})
     self.port = reactor.listenTCP(0,
                                   SiteWithDefaultHeaders(dbs_resource),
                                   interface="127.0.0.1")  # pylint: disable=no-member