Skip to content

Commit

Permalink
Fix PNI & SIM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luabida committed Dec 12, 2023
1 parent 14a0fe8 commit b194d02
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions pysus/ftp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"PYSUS_CACHEPATH", os.path.join(str(pathlib.Path.home()), "pysus")
)

os.mkdir(CACHEPATH)


def to_list(ite: Any) -> list:
"""Parse any builtin data type into a list"""
Expand Down
10 changes: 10 additions & 0 deletions pysus/tests/test_ftp/test_File.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding:utf-8 -*-
u"""
Created on 2023/12/12
by luabida
license: GPL V3 or Later
"""
import unittest
import datetime

from pysus.ftp import File
2 changes: 1 addition & 1 deletion pysus/tests/test_ftp/test_databases/test_CIHA.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_ciha(self):
'pysus.ftp.databases.ciha.CIHA',
return_value=MagicMock(__content__=mock_content)
) as mock_ciha:
ciha = CIHA()
ciha = CIHA().load()
ciha.__content__ = mock_ciha().__content__

descriptions = [ciha.describe(file) for file in ciha.files]
Expand Down
4 changes: 2 additions & 2 deletions pysus/tests/test_ftp/test_databases/test_PNI.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def test_pni(self):
'modify': datetime.datetime(2019, 5, 23, 16, 39)
}
),
"STAC0510.dbc": File(
"CPNIAC02.DBF": File(
path="/dissemin/publicos/PNI/DADOS/CPNIAC02.DBF",
name="STAC0510.dbc",
name="CPNIAC02.DBF",
info={
'size': 14843,
'type': 'file',
Expand Down

0 comments on commit b194d02

Please sign in to comment.