def setUp(self): self.connector = MockConnector(urlparse.urlparse('/baseurl/repo/')) self.connector.connect() self.pi = index.PictureIndex() self.pi.add(MockPicture.create_many(10)) self.conf = repo.new_repo_config() self.conf['index.file'] = 'mock-index-path'
def setUp(self): self.prog = 'prog -a -b -c' self.pics = MockPicture.create_many(50) self.thumbs = [pic.get_thumbnail_filenames()[0] for pic in self.pics] self.viewer_err_logger = mock.Mock() viewer_logger.error = self.viewer_err_logger # patch viewer's log.error