Skip to content

Commit

Permalink
unittest: use the new collection_name() name
Browse files Browse the repository at this point in the history
Depends-On: ansible/ansible-zuul-jobs#889

`collection_name()` is now `get_collection_name_from_path()`

Also, ensure the `coverage` package is present to avoid an error
post-test execution.
  • Loading branch information
goneri committed May 14, 2021
1 parent 730fdc5 commit 9fa1bda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage==4.5.4
4 changes: 2 additions & 2 deletions tests/unit/module_utils/test_turbo_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import subprocess
import ansible.module_utils.basic
from ansible_collections.cloud.common.plugins.module_utils.turbo.module import (
collection_name,
get_collection_name_from_path,
connect,
start_daemon,
)
Expand All @@ -31,7 +31,7 @@ def mocked_func():
return my_module_path

monkeypatch.setattr(ansible.module_utils.basic, "get_module_path", mocked_func)
assert collection_name() == my_collection_name
assert get_collection_name_from_path() == my_collection_name


def test_start_daemon(monkeypatch):
Expand Down

0 comments on commit 9fa1bda

Please sign in to comment.