Skip to content

Commit 0590bd6

Browse files
🧪 update tests
1 parent f6589b6 commit 0590bd6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tests/test_app.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from zipfile import ZipFile
2+
13
import pytest
24

35
import squarecloud
@@ -28,6 +30,11 @@ async def test_app_logs(self, app: Application):
2830
async def test_app_backup(self, app: Application):
2931
assert isinstance(await app.backup(), squarecloud.Backup)
3032

33+
async def test_download_backup(self, app: Application):
34+
backup = await app.backup()
35+
zip_file = await backup.download()
36+
assert isinstance(zip_file, ZipFile)
37+
3138
async def test_app_github_integration(self, app: Application):
3239
assert isinstance(
3340
await app.github_integration(GITHUB_ACCESS_TOKEN), str
@@ -40,7 +47,6 @@ async def test_domain_analytics(self, app: Application):
4047
assert isinstance(
4148
await app.domain_analytics(), squarecloud.DomainAnalytics
4249
)
43-
4450
@pytest.mark.skip
4551
async def test_set_custom_domain(self, app: Application):
4652
assert isinstance(await app.set_custom_domain('test.com.br'), str)

tests/test_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def test_files_type(self, app_files: list[FileInfo]):
1919

2020
assert isinstance(file.name, str)
2121
assert isinstance(file.size, int)
22-
assert isinstance(file.lastModified, int | float)
22+
assert isinstance(file.lastModified, int | float | None)
2323

2424
assert file.type in ('file', 'directory')
2525

@@ -53,7 +53,7 @@ async def test_files_list(
5353

5454
assert isinstance(file.name, str)
5555
assert isinstance(file.size, int)
56-
assert isinstance(file.lastModified, int | float)
56+
assert isinstance(file.lastModified, int | float | None)
5757

5858
assert file.type in ('file', 'directory')
5959

0 commit comments

Comments
 (0)