Skip to content

Commit

Permalink
tries fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Feb 25, 2024
1 parent 0b33020 commit d26f233
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions ceurws/ceur_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ def load(self):
"""
if Download.needsDownload(CEURWS.CACHE_FILE):
self.loadFromIndexHtml()
self.store()
else:
self.loadFromBackup()

Expand Down
7 changes: 1 addition & 6 deletions ceurws/wikidatasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,7 @@ def prepareVolumeManager(self):
prepare my volume manager
"""
self.vm = VolumeManager()
if Download.needsDownload(CEURWS.CACHE_FILE):
self.vm.loadFromIndexHtml(force=True)
self.vm.store()
else:
self.vm.loadFromBackup()
self.vm.load()
self.volumesByNumber, _duplicates = LOD.getLookup(self.vm.getList(), "number")
self.volumeList = self.vm.getList()
self.volumeCount = len(self.volumeList)
Expand All @@ -148,7 +144,6 @@ def prepareVolumeManager(self):
for volume_number in reverse_keys:
volume = self.volumesByNumber[volume_number]
self.volumeOptions[volume.number] = f"Vol-{volume.number}:{volume.title}"


def addVolume(self, volume: Volume):
"""
Expand Down
5 changes: 4 additions & 1 deletion tests/test_indexhtml_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ def volumesAsCsv(self, volumes, minVolumeNumber, maxVolumeNumber):
)

def testVolumeManagerFromHtml(self):
"""
test loading the volume manager from HTML
"""
vm = VolumeManager()
vm.loadFromIndexHtml(force=True)
vm.loadFromIndexHtml()
withStore = False
if withStore:
vm.store()
Expand Down

0 comments on commit d26f233

Please sign in to comment.