Skip to content
Snippets Groups Projects
Commit b389760e authored by Erik Reid's avatar Erik Reid
Browse files

added a test

parent 17660760
No related branches found
Tags 0.19
No related merge requests found
...@@ -3,6 +3,7 @@ just checks that the worker methods call the right functions ...@@ -3,6 +3,7 @@ just checks that the worker methods call the right functions
and some data ends up in the right place ... otherwise not very detailed and some data ends up in the right place ... otherwise not very detailed
""" """
import contextlib import contextlib
import os
from inventory_provider.tasks import worker from inventory_provider.tasks import worker
...@@ -46,3 +47,10 @@ def test_update_locations(mocker, mocked_worker_module, mocked_redis): ...@@ -46,3 +47,10 @@ def test_update_locations(mocker, mocked_worker_module, mocked_redis):
assert len(list(_cached_locations())) == 0 # sanity assert len(list(_cached_locations())) == 0 # sanity
worker.update_equipment_locations() worker.update_equipment_locations()
assert len(list(_cached_locations())) > 0 assert len(list(_cached_locations())) > 0
def test_InventoryTask_obj(data_config_filename):
os.environ['INVENTORY_PROVIDER_CONFIG_FILENAME'] = data_config_filename
task = worker.InventoryTask()
assert task.config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment