@@ -17,8 +17,8 @@ def test_list_to_regex_pattern():
1717 assert res == "(.*img1|.*img2|.*img3)"
1818
1919
20- @patch ("workflows.send_decom_image_email .ImageQuery" )
21- @patch ("workflows.send_decom_image_email .list_to_regex_pattern" )
20+ @patch ("apis.openstack_query_api.server_queries .ImageQuery" )
21+ @patch ("apis.openstack_query_api.server_queries .list_to_regex_pattern" )
2222def test_find_servers_with_image_valid (mock_list_to_regex , mock_image_query ):
2323 """
2424 Tests find_servers_with_images() function
@@ -49,7 +49,7 @@ def test_find_servers_with_image_valid(mock_list_to_regex, mock_image_query):
4949 )
5050 mock_image_query_obj .to_props .assert_called_once ()
5151 mock_image_query_obj .then .assert_called_once_with (
52- "server_query " , keep_previous_results = True
52+ "SERVER_QUERY " , keep_previous_results = True
5353 )
5454
5555 mock_server_query_obj .run .assert_called_once_with (
@@ -68,8 +68,8 @@ def test_find_servers_with_image_valid(mock_list_to_regex, mock_image_query):
6868 assert res == mock_server_query_obj
6969
7070
71- @patch ("workflows.send_decom_image_email .ImageQuery" )
72- @patch ("workflows.send_decom_image_email .list_to_regex_pattern" )
71+ @patch ("apis.openstack_query_api.server_queries .ImageQuery" )
72+ @patch ("apis.openstack_query_api.server_queries .list_to_regex_pattern" )
7373def test_find_servers_with_image_invalid_images (mock_list_to_regex , mock_image_query ):
7474 """
7575 Tests that find_servers_with_images() raises an error when supplied with an invalid image name
@@ -100,8 +100,8 @@ def test_find_servers_with_image_invalid_images(mock_list_to_regex, mock_image_q
100100 mock_image_query_obj .to_props .assert_called_once ()
101101
102102
103- @patch ("workflows.send_decom_image_email .ImageQuery" )
104- @patch ("workflows.send_decom_image_email .list_to_regex_pattern" )
103+ @patch ("apis.openstack_query_api.server_queries .ImageQuery" )
104+ @patch ("apis.openstack_query_api.server_queries .list_to_regex_pattern" )
105105def test_find_servers_with_image_no_servers_found (mock_list_to_regex , mock_image_query ):
106106 """
107107 Tests that find_servers_with_images() raises an error when no servers are found
0 commit comments