add inventory plugin unit test test_verify_file (#2773) (#2777)

* add inventory plugin unit test `test_verify_file`

* fix typos in `test_verify_file_bad_config` unit test

(cherry picked from commit f44300cec5)

Co-authored-by: Rémy Keil <remy.keil@gmail.com>
This commit is contained in:
patchback[bot] 2021-06-10 22:26:28 +02:00 committed by GitHub
parent 92ccc6f013
commit ffdef00a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 2 deletions

View file

@ -21,6 +21,12 @@ def inventory():
return r
def test_verify_file(tmp_path, inventory):
file = tmp_path / "foobar.proxmox.yml"
file.touch()
assert inventory.verify_file(str(file)) is True
def test_verify_file_bad_config(inventory):
assert inventory.verify_file('foobar.proxmox.yml') is False