def setUp(self): self.conn.drop_database(self._testMethodName) self.store = MongoServerStore(self.conn, self._testMethodName) self.mother = ModelCreator(self.store) self.user = self.mother.make_test_user() self.p = PublishService(self.store, self.user.ID) self.brl = BRLBlock('%s/%s/block/master' % (self.user.ID, self.user.ID)) pack = PublishRequest(BlockVersion(self.brl, -1)) pack.cells.append(SimpleCell('%s/block/r1.h' % self.user.ID)) pack.cells.append(SimpleCell('%s/block/r2.h' % self.user.ID)) pack.cells.append(SimpleCell('%s/block/r3.h' % self.user.ID)) pack.contents['r1.h'] = Content(id_=None, load=Blob('r1')) pack.contents['r2.h'] = Content(id_=None, load=Blob('r2')) pack.contents['r3.h'] = Content(id_=None, load=Blob('r3')) pack.deptable = BlockVersionTable() self.pack = pack self.cell_collection = self.store.db[ GenericServerStore.PUBLISHED_CELL_ST] self.content_collection = self.store.db[ GenericServerStore.PUBLISHED_CONTENT_ST] self.block_collection = self.store.db[GenericServerStore.BLOCK_ST]
def setUp(self): self.store = MongoServerStore(self.conn, self.__class__.__name__) self.mother = ModelCreator(self.store) self.user = self.mother.make_test_user()