open-space-toolkit-io 0.7.0__py310-none-any.whl → 0.7.2__py310-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/METADATA +2 -2
- {open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/RECORD +8 -8
- {open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/WHEEL +1 -1
- ostk/io/OpenSpaceToolkitIOPy.cpython-310-x86_64-linux-gnu.so +0 -0
- ostk/io/libopen-space-toolkit-io.so.0 +0 -0
- ostk/io/test/ip/tcp/http/test_client.py +40 -5
- {open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/top_level.txt +0 -0
- {open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/zip-safe +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: open-space-toolkit-io
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.2
|
4
4
|
Summary: Addressing, networking, database connectors.
|
5
5
|
Author: Open Space Collective
|
6
6
|
Author-email: contact@open-space-collective.org
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
12
12
|
Classifier: Operating System :: POSIX :: Linux
|
13
13
|
Description-Content-Type: text/markdown
|
14
|
-
Requires-Dist: open-space-toolkit-core (
|
14
|
+
Requires-Dist: open-space-toolkit-core (~=0.7.3)
|
15
15
|
|
16
16
|
# Open Space Toolkit ▸ I/O
|
17
17
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
ostk/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
2
|
-
ostk/io/OpenSpaceToolkitIOPy.cpython-310-x86_64-linux-gnu.so,sha256=
|
2
|
+
ostk/io/OpenSpaceToolkitIOPy.cpython-310-x86_64-linux-gnu.so,sha256=bDIOpIwZ-Up3vzRZ2szaLasP5cXX3j1uUm8frp_A_Q4,307168
|
3
3
|
ostk/io/__init__.py,sha256=IpLxatW_R2ItRy031KQcbFRNczGDpWeozg9COJH9QLA,83
|
4
|
-
ostk/io/libopen-space-toolkit-io.so.0,sha256=
|
4
|
+
ostk/io/libopen-space-toolkit-io.so.0,sha256=_mmxgKx9XjpDPasV_ZeZnbe8LdKqEZ2Euz1F3gMWyhg,9332440
|
5
5
|
ostk/io/test/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
6
6
|
ostk/io/test/ip/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
7
7
|
ostk/io/test/ip/tcp/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
8
8
|
ostk/io/test/ip/tcp/http/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
9
|
-
ostk/io/test/ip/tcp/http/test_client.py,sha256=
|
9
|
+
ostk/io/test/ip/tcp/http/test_client.py,sha256=I0nRWp3HTkr2oMEbOSZJZEYVHxn7pbAdE6kBdI29mbU,1682
|
10
10
|
ostk/io/test/ip/tcp/http/test_request.py,sha256=-puxxwFqhzizeX8odF0gqgbRCXLk_zDCZkQuEUNJYx0,2205
|
11
11
|
ostk/io/test/ip/tcp/http/test_response.py,sha256=GAnbvAeNHJO9odmvxmZrW-ruuCHLYI-xYMJFQAE41lw,5866
|
12
12
|
ostk/io/test/url/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
13
13
|
ostk/io/test/url/test_url.py,sha256=g4kFtb-05atsd6ypnDanUCQgizpOfNwrNtzWzBIsLE8,4555
|
14
|
-
open_space_toolkit_io-0.7.
|
15
|
-
open_space_toolkit_io-0.7.
|
16
|
-
open_space_toolkit_io-0.7.
|
17
|
-
open_space_toolkit_io-0.7.
|
18
|
-
open_space_toolkit_io-0.7.
|
14
|
+
open_space_toolkit_io-0.7.2.dist-info/METADATA,sha256=FAPUYotfwXzTZ-ZCYY7rfS-KP9IYvDRQvHlxuHnZusQ,1674
|
15
|
+
open_space_toolkit_io-0.7.2.dist-info/WHEEL,sha256=oaSFssuzKzruaIhyzhbDphpBmFeR9wv-Pmjc-TsXgB4,94
|
16
|
+
open_space_toolkit_io-0.7.2.dist-info/top_level.txt,sha256=zOR18699uDYnafgarhL8WU_LmTZY_5NVqutv-flp_x4,5
|
17
|
+
open_space_toolkit_io-0.7.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
18
|
+
open_space_toolkit_io-0.7.2.dist-info/RECORD,,
|
Binary file
|
Binary file
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import pytest
|
4
4
|
|
5
5
|
import ostk.io as io
|
6
|
+
from ostk.core.filesystem import Directory, File, Path
|
6
7
|
|
7
8
|
URL = io.URL
|
8
9
|
Request = io.ip.tcp.http.Request
|
@@ -10,16 +11,50 @@ Response = io.ip.tcp.http.Response
|
|
10
11
|
Client = io.ip.tcp.http.Client
|
11
12
|
|
12
13
|
|
13
|
-
def
|
14
|
-
|
14
|
+
def test_http_client_get_success():
|
15
|
+
url = URL.parse("https://www.google.com")
|
16
|
+
|
17
|
+
response = Client.get(url)
|
15
18
|
|
16
19
|
assert response is not None
|
17
20
|
assert response.is_defined() is True
|
18
21
|
assert response.is_ok() is True
|
19
22
|
assert response.get_status_code() == Response.StatusCode.Ok
|
20
23
|
|
21
|
-
# response = Client.send()
|
22
24
|
|
23
|
-
|
25
|
+
def test_http_client_send_success():
|
26
|
+
url = URL.parse("https://www.google.com")
|
27
|
+
|
28
|
+
request = Request(Request.Method.Get, url, "")
|
29
|
+
response = Client.send(request)
|
30
|
+
|
31
|
+
assert response is not None
|
32
|
+
assert response.is_defined() is True
|
33
|
+
assert response.is_ok() is True
|
34
|
+
assert response.get_status_code() == Response.StatusCode.Ok
|
35
|
+
|
36
|
+
|
37
|
+
def test_http_client_fetch_success():
|
38
|
+
url = URL.parse(
|
39
|
+
"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
|
40
|
+
)
|
41
|
+
directory = Directory.path(Path.parse("/tmp"))
|
42
|
+
|
43
|
+
file_response = Client.fetch(url, directory)
|
44
|
+
|
45
|
+
assert file_response is not None
|
46
|
+
assert file_response.exists() is True
|
47
|
+
|
48
|
+
|
49
|
+
# def test_http_client_list_success():
|
50
|
+
|
51
|
+
# Disabling similar to the C++ test. The list takes about 1 minute to complete for some reason.
|
52
|
+
|
53
|
+
# url = URL.parse("ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/")
|
54
|
+
# file_input = File.path(Path.parse("/tmp/listing.txt"))
|
55
|
+
# response = Client.list(url, file_input, 3)
|
24
56
|
|
25
|
-
|
57
|
+
# assert response is not None
|
58
|
+
# assert response.is_defined() is True
|
59
|
+
# assert response.is_ok() is True
|
60
|
+
# assert response.get_status_code() == Response.StatusCode.Ok
|
{open_space_toolkit_io-0.7.0.dist-info → open_space_toolkit_io-0.7.2.dist-info}/top_level.txt
RENAMED
File without changes
|
File without changes
|