def setUp(self): WLTestCase.setUp(self) index = Index() index.index.delete_all() index.index.commit() self.do_doktora = Book.from_xml_file(get_fixture('do-doktora.xml')) self.do_anusie = Book.from_xml_file( get_fixture('fraszka-do-anusie.xml', catalogue))
def setUp(self): WLTestCase.setUp(self) index = Index() index.index.delete_all() index.index.commit() self.do_doktora = Book.from_xml_file( get_fixture('do-doktora.xml')) self.do_anusie = Book.from_xml_file( get_fixture('fraszka-do-anusie.xml', catalogue))
def setUp(self): WLTestCase.setUp(self) index = Index() index.index.delete_all() index.index.commit() with self.settings(NO_SEARCH_INDEX=False): self.do_doktora = Book.from_xml_file(get_fixture('do-doktora.xml')) self.do_anusie = Book.from_xml_file( get_fixture('fraszka-do-anusie.xml', catalogue))
def setUp(self): WLTestCase.setUp(self) index = Index() index.index.delete_all() index.index.commit() with self.settings(NO_SEARCH_INDEX=False): self.do_doktora = Book.from_xml_file( get_fixture('do-doktora.xml')) self.do_anusie = Book.from_xml_file( get_fixture('fraszka-do-anusie.xml', catalogue))
def setUp(self): WLTestCase.setUp(self) index = Index() self.search = Search() index.delete_query(self.search.index.query(uid="*")) index.index.commit() self.do_doktora = Book.from_xml_file( get_fixture('do-doktora.xml', opds)) self.do_anusie = Book.from_xml_file( get_fixture('fraszka-do-anusie.xml', catalogue))
def setUp(self): WLTestCase.setUp(self) self.TEXT = """<utwor />""" self.child = BookInfoStub(genre='X-Genre', epoch='X-Epoch', kind='X-Kind', author=PersonStub(("Joe", ), "Doe"), **info_args("Child")) self.parent = BookInfoStub(genre='X-Genre', epoch='X-Epoch', kind='X-Kind', author=PersonStub(("Jim", ), "Lazy"), cover_url="http://example.com/cover.jpg", parts=[self.child.url], **info_args("Parent"))
def setUp(self): JVM.attachCurrentThread() WLTestCase.setUp(self) settings.NO_SEARCH_INDEX = False settings.SEARCH_INDEX = path.join(settings.MEDIA_ROOT, 'search') txt = path.join(path.dirname(__file__), 'files/fraszka-do-anusie.xml') self.book = models.Book.from_xml_file(txt) index = Index() index.open() try: index.index_book(self.book) except: index.close() self.search = Search()
def setUp(self): WLTestCase.setUp(self) author = PersonStub(("Jane",), "Doe") book_info = BookInfoStub(author=author, genre="Genre", epoch='Epoch', kind="Kind", **info_args(u"A book")) self.book = models.Book.from_text_and_meta(ContentFile(''' <utwor> <opowiadanie> <akap> <begin id="b1" /> <motyw id="m1">Theme</motyw> Test <end id="e1" /> </akap> </opowiadanie> </utwor> '''), book_info) self.collection = models.Collection.objects.create( title='Biblioteczka Boya', slug='boy', book_slugs='a-book')
def setUp(self): WLTestCase.setUp(self) self.TEXT = """<utwor />""" self.child = BookInfoStub( genre='X-Genre', epoch='X-Epoch', kind='X-Kind', author=PersonStub(("Joe",), "Doe"), **info_args("Child") ) self.parent = BookInfoStub( genre='X-Genre', epoch='X-Epoch', kind='X-Kind', author=PersonStub(("Jim",), "Lazy"), cover_url="http://example.com/cover.jpg", parts=[self.child.url], **info_args("Parent") )
def setUp(self): WLTestCase.setUp(self) author = PersonStub(("Jane", ), "Doe") book_info = BookInfoStub(author=author, genre="Genre", epoch='Epoch', kind="Kind", **info_args(u"A book")) self.book = models.Book.from_text_and_meta( ContentFile(''' <utwor> <opowiadanie> <akap> <begin id="b1" /> <motyw id="m1">Theme</motyw> Test <end id="e1" /> </akap> </opowiadanie> </utwor> '''), book_info) self.collection = models.Collection.objects.create( title='Biblioteczka Boya', slug='boy', book_slugs='a-book')