generated from astronomer/airflow-provider-sample
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bffd018
commit e5d9aec
Showing
2 changed files
with
209 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import pytest | ||
|
||
from ray_provider import __version__, get_provider_info | ||
|
||
|
||
def test_get_provider_info(): | ||
expected_info = { | ||
"package-name": "astro-provider-ray", | ||
"name": "Ray", | ||
"description": "An integration between airflow and ray", | ||
"connection-types": [{"connection-type": "ray", "hook-class-name": "ray_provider.hooks.ray.RayHook"}], | ||
"versions": [__version__], | ||
} | ||
|
||
result = get_provider_info() | ||
|
||
assert result == expected_info | ||
assert isinstance(result, dict) | ||
assert "package-name" in result | ||
assert "name" in result | ||
assert "description" in result | ||
assert "connection-types" in result | ||
assert "versions" in result | ||
assert isinstance(result["versions"], list) | ||
assert result["versions"][0] == __version__ | ||
|
||
|
||
if __name__ == "__main__": | ||
pytest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters