Skip to content

Commit

Permalink
fix generate data
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Mar 13, 2024
1 parent e46423c commit 4a78538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion APSToolkitPython/src/aps_toolkit/SVFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _read_contents(self):
pass

def download(self, output_dir):
resources = self.read()
resources = self.read_sources()
for resource in resources:
localpath = resource.local_path
combined_path = join(output_dir, localpath)
Expand Down
6 changes: 4 additions & 2 deletions APSToolkitPython/src/test/test_svf_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .context import Auth
import os


class TestSVFReader(TestCase):
def setUp(self):
self.urn = "dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLk9kOHR4RGJLU1NlbFRvVmcxb2MxVkE_dmVyc2lvbj0yNA"
Expand All @@ -13,8 +14,9 @@ def test_read_svf(self):
reader = SVFReader(self.urn, self.token)
resources = reader.read_sources()
self.assertTrue(len(resources) > 0)

def test_download_svf(self):
reader = SVFReader(self.urn, self.token)
folder = r"./data/svfs/"
folder = r"./output/svfs/"
reader.download(folder)
self.assertTrue(len(os.listdir(folder)) > 0)
self.assertTrue(len(os.listdir(folder)) > 0)

0 comments on commit 4a78538

Please sign in to comment.