Skip to content

Commit

Permalink
Added test_http.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-friis committed Aug 13, 2023
1 parent b694128 commit aa954d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions storages/python/tests-python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(python-tests
test_minio
test_template
test_template-jinja
test_http
)

include(FindPythonModule)
Expand Down
13 changes: 13 additions & 0 deletions storages/python/tests-python/test_http.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
try:
import requests
except ModuleNotFoundError:
print("requests not installed, skipping test")
raise SystemExit(44) # skip test

import dlite


url = "https://raw.githubusercontent.com/SINTEF/dlite/master/storages/python/tests-python/input/test_meta.json"

meta = dlite.Instance.from_location("http", url)
print(meta)

0 comments on commit aa954d2

Please sign in to comment.