Example #1
0
 def setUp(self):
     # TODO: arrange so we don't need to pass as many bogus strings
     self._service = WebService(reactor=reactor,
                                http_endpoint='tcp:0',
                                ws_endpoint='tcp:0',
                                root_cap='ROOT',
                                read_only_dbs={},
                                writable_db=DatabaseModel(reactor, {}),
                                root_object=SiteStateStub(),
                                flowgraph_for_debug=gr.top_block(),
                                title='test title')
     self._service.startService()
     self.url = self._service.get_url()
Example #2
0
 def _get_writable_database(self):
     if self.__writable_db is None:
         # TODO temporary stub till the client takes more configurability -- we should omit the writable db rather than having an unbacked one
         self.__writable_db = DatabaseModel(None, {}, writable=True)
     return self.__writable_db
Example #3
0
 def get_entry_point_resource(self, wcommon):
     return SessionResource(self,
                            read_only_dbs={},
                            writable_db=DatabaseModel(the_reactor, {},
                                                      writable=True),
                            wcommon=wcommon)
Example #4
0
 def setUp(self):
     self.session = Session(
         receive_flowgraph=Top(devices={'s1': SimulatedDevice()}),
         read_only_dbs={},
         writable_db=DatabaseModel(the_reactor, {}, writable=True),
         features={})